Introduced attachment push to RMASS (Working State)
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
name = "Get Synapse Attachment"
|
||||
|
||||
kind = "action"
|
||||
|
||||
showstatus = True
|
||||
|
||||
alias = "getsynapseattachment"
|
||||
|
||||
## PRE-RUNTIME ACTIONS
|
||||
|
||||
resolve = {
|
||||
"get": {
|
||||
"room_id": ["outmessageitem", "room_id"],
|
||||
# "matrix_sender": ["outmessageitem", "sender"],
|
||||
"msgtype": ["outmessageitem", "content", "msgtype"],
|
||||
"synapse_image": ["outmessageitem", "content", "url"],
|
||||
},
|
||||
"deconstruct": {
|
||||
"synapse_image" : [
|
||||
#"#rmass_dm_",
|
||||
"mxc://loxthelion.com/",
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
## RUNTIME ACTIONS
|
||||
|
||||
isrequest = True
|
||||
|
||||
method = "GET"
|
||||
|
||||
path = [
|
||||
#"https://loxthelion.com/_matrix/client/v3/rooms/",
|
||||
"https://loxthelion.com/_matrix/client/v1/media/download/loxthelion.com/",
|
||||
{"resolved": "synapse_image"},
|
||||
#"/state/m.room.canonical_alias",
|
||||
#"?user_id=%40rmass_bridge%3Aloxthelion.com"
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": {
|
||||
"os": "AS_TOKEN",
|
||||
"prefix": "Bearer ",
|
||||
},
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
|
||||
## POST-RUNTIME ACTIONS
|
||||
|
||||
image = "synapse_attachment"
|
||||
|
||||
filters = [
|
||||
{
|
||||
"filterkey": "msgtype",
|
||||
"operator": "==",
|
||||
"filtervalue": "m.text",
|
||||
"print": f"No image detected. Bypassing attachment push",
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user