Files
rmmanager/plugins/rmass/actions/synapsegetspaceid.py
T

33 lines
530 B
Python

import os
name = "Synapse Get Space ID"
kind = "action"
showstatus = True
resolve = {
"sender": ["messages", 0, "senderId"],
"locationcode": ["profile", "searchCity"],
}
method = "GET"
path = [
"https://loxthelion.com/_matrix/client/v3/directory/room/%23rmass_space_",
{"resolved": "locationcode"},
"%3Aloxthelion.com",
]
headers = {
"Authorization": {
"os": "AS_TOKEN",
"prefix": "Bearer ",
},
"Content-Type": "application/json",
}
outputs = {
"space_id": "room_id",
}