Introduced attachment push to RMASS (Working State)

This commit is contained in:
Lyncoln
2026-10-26 09:36:19 -04:00
parent a0a4a4cded
commit 9c005763ed
5 changed files with 301 additions and 0 deletions
@@ -0,0 +1,59 @@
name = "Upload Attachments to RMASS"
kind = "action"
alias = "uploadrmassattachment"
showstatus = True
isrequest = True
resolve = {
"get": {
"uploadurl": ["uploadurl"],
"msgtype": ["outmessageitem", "content", "msgtype"],
"rmass_user": ["room_alias"],
"path": ["lastmessage", 0, "content", "com.loxthelion.rmass_message_id"],
},
"deconstruct": {
"rmass_user" : [
"#rmass_dm_",
":loxthelion.com",
],
},
}
method = "POST"
#To add resolution suffix, second item must be a dictionary. References the "path" library under resolved
path = [
{"resolved": "uploadurl"},
]
headers = {
"Authorization": {
"output": "access_token",
"prefix": "Bearer ",
},
}
requestfile = "synapse_attachment"
requestdata = {
"mediaType": "30",
"emailId": {"resolved": "path"}
}
outputs = {
"rmass_uploaded_image": "url",
"mediaId": "mediaId"
}
filters = [
{
"filterkey": "msgtype",
"operator": "==",
"filtervalue": "m.text",
"print": f"No image detected. Bypassing attachment push",
},
]