Added Space organization
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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",
|
||||
#}
|
||||
@@ -0,0 +1,74 @@
|
||||
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",
|
||||
}
|
||||
@@ -6,15 +6,8 @@ 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"
|
||||
@@ -34,5 +27,5 @@ headers = {
|
||||
}
|
||||
|
||||
outputs = {
|
||||
"room_id": "room_id",
|
||||
"dmroom_id": "room_id",
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
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_spacetest_",
|
||||
{"resolved": "locationcode"},
|
||||
"%3Aloxthelion.com",
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": {
|
||||
"os": "AS_TOKEN",
|
||||
"prefix": "Bearer ",
|
||||
},
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
|
||||
outputs = {
|
||||
"space_id": "room_id",
|
||||
}
|
||||
@@ -6,14 +6,12 @@ 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"],
|
||||
"room_id": ["dmroom_id"],
|
||||
#"location": ["profile", "location"],
|
||||
}
|
||||
keys = [
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
from plugins.rmass.actions import pullmessagelist, refresh_tokens, getmessage, checkavailable, synapseregister, synapseassignusername, synapsecreatedmroom, synapsegetroomid, synapsepushmessages
|
||||
from plugins.rmass.actions import pullmessagelist, refresh_tokens, getmessage, checkavailable, synapseregister, synapseassignusername, synapsecreatespace, synapsegetspaceid, synapsecreatedmroom, synapsegetroomid, synapseassignspace, synapsepushmessages
|
||||
|
||||
name = "Get Message List"
|
||||
|
||||
@@ -14,6 +14,6 @@ actions = [
|
||||
recursiveset = {
|
||||
"source": "emails",
|
||||
"outputlabel": "messageheaders",
|
||||
"actions": [getmessage, synapseregister, synapseassignusername, synapsecreatedmroom, synapsegetroomid, synapsepushmessages],
|
||||
"actions": [getmessage, synapseregister, synapseassignusername, synapsecreatespace, synapsegetspaceid, synapsecreatedmroom, synapsegetroomid, synapseassignspace, synapsepushmessages],
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user