Update notify_matrix.sh
Fix Msgbody variable syntax
This commit is contained in:
parent
0b52dd50b6
commit
c09e813aad
@ -19,10 +19,10 @@ send_notification() {
|
|||||||
AccessToken="Your Matrix token here"
|
AccessToken="Your Matrix token here"
|
||||||
Room_id="Enter Room_id here"
|
Room_id="Enter Room_id here"
|
||||||
MatrixServer="Enter Your HomeServer URL"
|
MatrixServer="Enter Your HomeServer URL"
|
||||||
MsgBody="{msgtype":"m.text","body":"$MessageBody"}"
|
MsgBody="{\"msgtype\":\"m.text\",\"body\":\"$MessageBody\"}"
|
||||||
|
|
||||||
# URL Example: https://matrix.org/_matrix/client/r0/rooms/!xxxxxx:example.com/send/m.room.message/?access_token=xxxxxxxx
|
# URL Example: https://matrix.org/_matrix/client/r0/rooms/!xxxxxx:example.com/send/m.room.message/?access_token=xxxxxxxx
|
||||||
|
|
||||||
curl -sS -o /dev/null --fail -X PUT "$MatrixServer/_matrix/client/r0/rooms/$Room_id/send/m.room.message/?access_token=$AccessToken" -H 'Content-Type: application/json' -d "$MsgBody"
|
curl -sS -o /dev/null --fail -X PUT "$MatrixServer/_matrix/client/r0/rooms/$Room_id/send/m.room.message?access_token=$AccessToken" -H 'Content-Type: application/json' -d "$MsgBody"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user