Improved recursive handling by nesting operations in operations under then new buildRecursive. Also changed extract module to attach its findings to outputs for better resolver and recursiveSet targeting.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
name = "Upload Attachments to Synapse"
|
||||
|
||||
kind = "action"
|
||||
|
||||
alias = "uploadattachment"
|
||||
|
||||
showstatus = True
|
||||
|
||||
#resolve = {
|
||||
# "get": {
|
||||
#"sender": ["messageheaders", "userCard", "id"],
|
||||
#"avatar": ["uploadimage"],
|
||||
#"username": ["messageheaders", "userCard", "username"],
|
||||
#"avatar_hash": ["useravatar_hash"],
|
||||
# },
|
||||
#}
|
||||
|
||||
isrequest = True
|
||||
|
||||
method = "POST"
|
||||
|
||||
#To add resolution suffix, second item must be a dictionary. References the "path" library under resolved
|
||||
path = [
|
||||
"https://loxthelion.com/_matrix/media/v3/upload?filename=attachment.jpg",
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": {
|
||||
"os": "AS_TOKEN",
|
||||
"prefix": "Bearer ",
|
||||
},
|
||||
"Content-Type": "image/jpeg",
|
||||
}
|
||||
|
||||
requestdata = "message_attachment"
|
||||
|
||||
outputs = {
|
||||
"uploadattachment": "content_uri",
|
||||
}
|
||||
|
||||
#filters = [
|
||||
# {
|
||||
# "filterkey": "message_attachment",
|
||||
# "operator": "is",
|
||||
# "filtervalue": None,
|
||||
# "print": f"No attachments. Skipping {name}...",
|
||||
# },
|
||||
#]
|
||||
Reference in New Issue
Block a user