38 lines
870 B
Python
38 lines
870 B
Python
name = "Get Last Synapse Message"
|
|
|
|
kind = "action"
|
|
|
|
showstatus = True
|
|
|
|
isrequest = True
|
|
|
|
method = "GET"
|
|
|
|
resolve = {
|
|
"get": {
|
|
#"sender": ["room_name"],
|
|
"event_id": ["outmessageitem", "event_id"],
|
|
#"message_body": ["outmessageitem", "content", "body"],
|
|
"room_id": ["outmessageitem", "room_id"],
|
|
#"timestamp": ["outmessageitem", "origin_server_ts"],
|
|
},
|
|
}
|
|
|
|
path = [
|
|
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
|
{"resolved": "room_id"},
|
|
"/messages?dir=b&limit=1&filter=%7B%22types%22%3A%5B%22m.room.message%22%5D%2C%22not_senders%22%3A%5B%22%40lyncoln%3Aloxthelion.com%22%2C%22%40rmass_bridge%3Aloxthelion.com%22%5D%7D",
|
|
]
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"os": "ADMIN_TOKEN",
|
|
"prefix": "Bearer ",
|
|
},
|
|
"Content-Type": "application/json",
|
|
}
|
|
|
|
outputs = {
|
|
"lastmessage": "chunk"
|
|
}
|