diff --git a/matrix-send b/matrix-send index 57b79d5..0c15e98 100755 --- a/matrix-send +++ b/matrix-send @@ -68,7 +68,7 @@ Username () { } Password () { - [ -z $1 ] && conf_error "No argument for directive Password" + [ -z $1 ] && conf_error "No argument(s) for directive Password" password="$@" } @@ -88,7 +88,7 @@ CacheLocation () { DefaultEvent () { [ -z $1 ] && conf_error "No argument for directive DefaultEvent" - if vargrep "m\.(text|notice)" "$1" -Eo + if vargrep "m\.(text|notice)" "$1" -Eq then defaultevent="$1" else conf_error "Invalid default event type"; fi } @@ -130,6 +130,9 @@ ClearCache () { Send () { curl -s -XPOST -d "{"'"'"msgtype"'"'":"'"'"$mtype"'"'", "'"'"body"'"'":"'"'"$message"'"'"}" "https://$server/_matrix/client/r0/rooms/%21$roomid/send/m.room.message?access_token=$token" + #cat <