Added Space organization
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import os
|
||||
|
||||
name = "Synapse Assign Space"
|
||||
|
||||
kind = "action"
|
||||
|
||||
showstatus = True
|
||||
|
||||
astoken = os.environ["AS_TOKEN"]
|
||||
|
||||
resolve = {
|
||||
"sender": ["messages", 0, "senderId"],
|
||||
"space_id": ["space_id"],
|
||||
"username": ["profile", "username"],
|
||||
"room_id": ["dmroom_id"],
|
||||
}
|
||||
keys = [
|
||||
{
|
||||
"keytitle": "via",
|
||||
"keyvalue": [
|
||||
"loxthelion.com",
|
||||
],
|
||||
}
|
||||
]
|
||||
|
||||
method = "PUT"
|
||||
|
||||
#path = [
|
||||
# "https://loxthelion.com/_matrix/client/v3/profile/rmass_",
|
||||
# {"resolved": "sender"},
|
||||
# {"suffix": "/displayname"},
|
||||
#]
|
||||
path = [
|
||||
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
||||
{"resolved": "space_id"},
|
||||
"/state/m.space.child/",
|
||||
{"resolved": "room_id"},
|
||||
"?user_id=@rmass_bridge_test:loxthelion.com"
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": {
|
||||
"os": "AS_TOKEN",
|
||||
"prefix": "Bearer ",
|
||||
},
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
|
||||
#outputs = {
|
||||
# "user_id": "user_id",
|
||||
#}
|
||||
Reference in New Issue
Block a user