50 lines
873 B
Python
50 lines
873 B
Python
name = "Get RMASS Message Attachment ID"
|
|
|
|
kind = "action"
|
|
|
|
alias = "getrmassattachmentid"
|
|
|
|
depends = [
|
|
"synapsegetattachment",
|
|
"getrmassattachmenturl",
|
|
"synapseattachmenttormass",
|
|
]
|
|
|
|
showstatus = True
|
|
|
|
resolve = {
|
|
"get": {
|
|
"path": ["lastmessage", 0, "content", "com.loxthelion.rmass_message_id"],
|
|
"msgtype": ["outmessageitem", "content", "msgtype"],
|
|
}
|
|
}
|
|
|
|
isrequest = True
|
|
|
|
method = "GET"
|
|
|
|
path = [
|
|
"https://rentmasseur.com/api/v1/mailbox/",
|
|
{"resolved": "path"},
|
|
"/attachments"
|
|
]
|
|
|
|
outputs = {
|
|
"rmass_attachment_id": "id"
|
|
}
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"output": "access_token",
|
|
"prefix": "Bearer ",
|
|
},
|
|
}
|
|
|
|
filters = [
|
|
{
|
|
"filterkey": "msgtype",
|
|
"operator": "==",
|
|
"filtervalue": "m.text",
|
|
"print": f"No image detected. Bypassing attachment push",
|
|
},
|
|
] |