53 lines
896 B
Python
53 lines
896 B
Python
#import os
|
|
|
|
name = "Synapse Message Error Notification"
|
|
|
|
kind = "action"
|
|
|
|
alias = "synapsemsgerrnotify"
|
|
|
|
showstatus = True
|
|
|
|
resolve = {
|
|
"get": {
|
|
"event_id": ["events", 0, "event_id"],
|
|
"room_id": ["events", 0, "room_id"],
|
|
},
|
|
}
|
|
|
|
keys = [
|
|
{
|
|
"keytitle": "msgtype",
|
|
"keyvalue": "m.notify",
|
|
},
|
|
{
|
|
"keytitle": "body",
|
|
"keyvalue": "Message must have between 5 and 2000 characters",
|
|
},
|
|
]
|
|
|
|
method = "PUT"
|
|
|
|
path = [
|
|
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
|
{"resolved": "room_id"},
|
|
"/send/m.room.message/",
|
|
{"resolved": "event_id"},
|
|
#"?user_id=@rmass_",
|
|
#{"resolved": "sender"},
|
|
#":loxthelion.com"
|
|
#"&ts=",
|
|
#{"resolved": "timestamp"},
|
|
#"000"
|
|
]
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"os": "AS_TOKEN",
|
|
"prefix": "Bearer ",
|
|
},
|
|
"Content-Type": "application/json",
|
|
}
|
|
|
|
|