import os name = "Synapse Create Space" kind = "action" showstatus = True resolve = { "sender": ["messages", 0, "senderId"], #"messageid": ["message", "id"], "username": ["profile", "username"], "locationname": ["profile", "location"], "locationcode": ["profile", "searchCity"], } keys = [ { "keytitle": "name", "keyvalue": { "resolved": "locationname", }, }, { "keytitle": "room_alias_name", "keyvalue": { "resolved": "locationcode", "prefix": "rmass_spacetest_", }, }, { "keytitle": "visibility", "keyvalue": "private", }, { "keytitle": "creation_content", "keyvalue": { "type": "m.space", }, }, { "keytitle": "invite", "keyvalue": ["@lyncoln:loxthelion.com"], }, #{ #"keytitle": "power_level_content_override", #"keyvalue": { #"users": { #"@lyncoln:loxthelion.com": 100, #"@rmass_:loxthelion.com": 100, #}, #}, #} ] method = "POST" path = [ #"https://loxthelion.com/_matrix/client/v3/createRoom?user_id=@rmass_", #{"resolved": "sender"}, #":loxthelion.com", "https://loxthelion.com/_matrix/client/v3/createRoom?user_id=@rmass_bridge_test:loxthelion.com" ] headers = { "Authorization": { "os": "AS_TOKEN", "prefix": "Bearer ", }, "Content-Type": "application/json", } outputs = { "space_id": "room_id", }