71 lines
1.5 KiB
Python
71 lines
1.5 KiB
Python
name = "Get Synapse Room Alias"
|
|
|
|
kind = "action"
|
|
|
|
showstatus = True
|
|
|
|
## PRE-RUNTIME ACTIONS
|
|
|
|
resolve = {
|
|
"get": {
|
|
"room_id": ["outmessageitem", "room_id"],
|
|
# "matrix_sender": ["outmessageitem", "sender"],
|
|
# "msg_type": ["outmessageitem", "type"],
|
|
# "echo_tag": ["outmessageitem", "content", "com.loxthelion.rmass_message_id"],
|
|
},
|
|
}
|
|
|
|
## RUNTIME ACTIONS
|
|
|
|
isrequest = True
|
|
|
|
method = "GET"
|
|
|
|
path = [
|
|
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
|
{"resolved": "room_id"},
|
|
"/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
|
|
|
|
outputs = {
|
|
"room_alias": "alias"
|
|
}
|
|
|
|
#filters = [
|
|
# {
|
|
# "filterkey": "outmessageitem",
|
|
# "operator": "in",
|
|
# "filtervalue": "state_key",
|
|
# "print": f"Excluding state.key event during {name}",
|
|
# },
|
|
# {
|
|
# "filterkey": "matrix_sender",
|
|
# "operator": "!=",
|
|
# "filtervalue": "@lyncoln:loxthelion.com",
|
|
# "print": f"Excluding message loop item during {name}",
|
|
# },
|
|
# {
|
|
# "filterkey": "msg_type",
|
|
# "operator": "!=",
|
|
# "filtervalue": "m.room.message",
|
|
# "print": f"Excluding non-room message event during {name}",
|
|
# },
|
|
# {
|
|
# "filterkey": "echo_tag",
|
|
# "operator": "is not",
|
|
# "filtervalue": None,
|
|
# "print": f"Excluding imported message event during {name}",
|
|
# },
|
|
#]
|