55 lines
1.1 KiB
Python
55 lines
1.1 KiB
Python
name = "Get Synapse Room Alias"
|
|
|
|
kind = "action"
|
|
|
|
showstatus = True
|
|
|
|
#recursive = {
|
|
# "source": "getmessage",
|
|
# "reverse": True,
|
|
# "label": "messageitem",
|
|
#}
|
|
|
|
resolve = {
|
|
"get": {
|
|
#"sender": ["messageitem", "senderId"],
|
|
#"event_id": ["messageitem", "id"],
|
|
#"message_body": ["events", 0, "content", "body"],
|
|
"room_id": ["outmessageitem", "room_id"],
|
|
#"timestamp": ["events", 0, "original_server_ts"],
|
|
},
|
|
# "construct": {
|
|
# "matrixuser": [
|
|
# "@rmass_",
|
|
# {"resolved": "sender"},
|
|
# ":loxthelion.com",
|
|
# ],
|
|
# },
|
|
# "transform": {
|
|
# "matrixuser": {
|
|
# "@lyncoln:loxthelion.com": "@rmass_238302:loxthelion.com",
|
|
# },
|
|
# },
|
|
}
|
|
|
|
|
|
method = "GET"
|
|
|
|
path = [
|
|
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
|
{"resolved": "room_id"},
|
|
"/state/m.room.canonical_alias",
|
|
]
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"os": "ADMIN_TOKEN",
|
|
"prefix": "Bearer ",
|
|
},
|
|
"Content-Type": "application/json",
|
|
}
|
|
|
|
outputs = {
|
|
"room_name": "alias"
|
|
}
|