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", }, ]