39 lines
712 B
Python
39 lines
712 B
Python
import os
|
|
|
|
name = "Synapse Get Room ID"
|
|
|
|
kind = "action"
|
|
|
|
showstatus = True
|
|
|
|
#astoken = os.environ["AS_TOKEN"]
|
|
|
|
resolve = {
|
|
"sender": ["messages", 0, "senderId"],
|
|
#"message_id": ["messages", 0, "id"],
|
|
#"username": ["profile", "username"],
|
|
#"message_body": ["messages", 0, "text"],
|
|
#"room_id": ["room_id"],
|
|
#"location": ["profile", "location"],
|
|
}
|
|
|
|
method = "GET"
|
|
|
|
path = [
|
|
"https://loxthelion.com/_matrix/client/v3/directory/room/%23rmass_dmtest_",
|
|
{"resolved": "sender"},
|
|
"%3Aloxthelion.com",
|
|
]
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"os": "AS_TOKEN",
|
|
"prefix": "Bearer ",
|
|
},
|
|
"Content-Type": "application/json",
|
|
}
|
|
|
|
outputs = {
|
|
"room_id": "room_id",
|
|
}
|