CorvinusLucian Posted April 6, 2022 Share Posted April 6, 2022 (edited) The ability to have Matrix as a notification agent would be great. Also having a section for custom agents. An example script to send a message to Matrix room (inc E2EE) 1 2 #!/bin/bash # https://gist.github.com/RickCogley/69f430d4418ae5498e8febab44d241c9 # https://gist.github.com/travnewmatic/769cd9532504e0f85983d69acd4a7d29 # # Get Access Token # curl -XPOST -d '{"type":"m.login.password", "user":"***your_username***", "password":"***your_password***"}' "https://matrix.org/_matrix/client/r0/login" msgtype=m.text homeserver=<homeserver> room=<room> accesstoken=<accesstoken> #Piped Version #curl -XPOST -d "$( jq -Rsc --arg msgtype "$msgtype" '{$msgtype, body:.}')" -H 'Authorization: Bearer $accesstoken' "https://$homeserver/_matrix/client/r0/rooms/$room/send/m.room.message" #Arg Version curl -XPOST -d '{'\"msgtype\":\"$msgtype\"', '\"body\"':'\""$*"\"'}' -H 'Authorization: Bearer $accesstoken' "https://$homeserver/_matrix/client/r0/rooms/$room/send/m.room.message" #RichText Version #curl -XPOST -d '{"msgtype":"m.text", "body":"**Hello**","format":"org.matrix.custom.html","formatted_body":"<strong>hello</strong>"}' -H 'Authorization: Bearer $accesstoken' "https://$homeserver/_matrix/client/r0/rooms/$room/send/m.room.message" Edited April 9, 2022 by CorvinusLucian duplicate access token in piped url 1 2 Quote Link to comment
CorvinusLucian Posted May 25, 2022 Author Share Posted May 25, 2022 Should it be of interest, I'm working round the limited notification agent options via Mailrise (uses apprise api). Thanks to the Compose Manager plugin, it is very easy to run on the unraid server itself. Quote Link to comment
Hammy Havoc Posted September 21, 2022 Share Posted September 21, 2022 Would love to see native support for Matrix notifications. Quote Link to comment
ich777 Posted July 3, 2023 Share Posted July 3, 2023 Oh just to let you know, I've implemented Pushbits notifications into Unraid which is a notification agent for Matrix-Synapse. Pushbits is based on the Gotify API and is working really well with Unraid. You can find the Docker container also in the CA App. & @kardinal EDIT: It looks something like that in the Unraid GUI: And if you click test you get this: The notifications are also color coded for Normal, Warning and Alert messages if enabled in Pushbits. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.