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],
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
{"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3OTIwMDY2MTgsIm5iZiI6MTc5MjAwNjQzOCwic3ViIjoiMjM4MzAyIiwidXNlcm5hbWUiOiJYeHhvdGlxIiwidXNlclR5cGUiOjEsInN0YWdlTmFtZSI6Ilh4eG90aXEiLCJhcHByb3ZlZCI6MSwibG9jYXRpb25JZCI6NDcyLCJzZWFyY2hDaXR5IjoiYXRsYW50YSIsImNvdW50cnlTaG9ydCI6IlVTIiwic2Vzc2lvbkNvdW50cnlDb250aW5lbnQiOiJOQSIsImlzRnJvemVuIjowLCJsb2NhdGlvbkxhYmVsIjoiQXRsYW50YSwgR0EiLCJpc3MiOiJodHRwczovL3JlbnRtYXNzZXVyLmNvbSIsImlhdCI6MTc5MjAwNjQ5OH0.yqVHEvRGiv4-ex2YocTLpZi9MMvdEUn8gDjIUEFgFI7aN1xTUxsaFUwU2trlyyMxvWsGrItmL2R5WNUEtETMlQ", "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJleHAiOjE3OTQ1OTg0OTgsIm5iZiI6MTc5MjAwNjQzOCwianRpIjoiRVdqOUllLzFJS0d0Q2h0RmRqdlJidnM4empNamFCTnVLdVVTbnFJSndrOD0iLCJpc3MiOiJodHRwczovL3JlbnRtYXNzZXVyLmNvbSIsImlhdCI6MTc5MjAwNjQ5OCwic3ViIjoiMjM4MzAyIn0.X43vHLDs-n7Wf9NURurGHYf_8X6zsrYLX2AmwgZIZ7y_X6tZ4vE7NmywN6jZ_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