Added ability to locate rmassconversation and last message for event id/message id matching
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
name = "Get messages"
|
||||
|
||||
kind = "action"
|
||||
|
||||
alias = "getmessage"
|
||||
|
||||
showstatus = True
|
||||
|
||||
isrequest = True
|
||||
|
||||
method = "GET"
|
||||
|
||||
#Used to resolve path for recursive handling. Path location must match the location of the recursiveset data from pullmessage operation
|
||||
resolve = {
|
||||
"get": {
|
||||
"path": ["lastmessage", 0, "content", "com.loxthelion.rmass_message_id"],
|
||||
},
|
||||
}
|
||||
|
||||
#To add resolution suffix, second item must be a dictionary. References the "path" library under resolved
|
||||
path = [
|
||||
"https://rentmasseur.com/api/v1/mailbox/",
|
||||
{"resolved": "path"},
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": {
|
||||
"output": "access_token",
|
||||
"prefix": "Bearer ",
|
||||
},
|
||||
}
|
||||
|
||||
outputs = {
|
||||
"rmasslastmessages": "messages",
|
||||
}
|
||||
|
||||
#outputs["rmasslastmessage"][0]["id"] is where we get our messageid
|
||||
select = {
|
||||
"source": "rmasslastmessages",
|
||||
"include": {
|
||||
"key": "senderId",
|
||||
"value": 238302,
|
||||
},
|
||||
"exclude": {
|
||||
"key": {"currentFolder"},
|
||||
"value": 1,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user