Matrix bridge working and effectively pushing messages
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
import os
|
||||
|
||||
name = "Synapse Create DM Room"
|
||||
|
||||
kind = "action"
|
||||
|
||||
showstatus = True
|
||||
|
||||
astoken = os.environ["AS_TOKEN"]
|
||||
|
||||
resolve = {
|
||||
"sender": ["messages", 0, "senderId"],
|
||||
#"messageid": ["message", "id"],
|
||||
"username": ["profile", "username"],
|
||||
#"location": ["profile", "location"],
|
||||
}
|
||||
keys = [
|
||||
{
|
||||
"keytitle": "name",
|
||||
"keyvalue": {
|
||||
"resolved": "username",
|
||||
},
|
||||
},
|
||||
{
|
||||
"keytitle": "room_alias_name",
|
||||
"keyvalue": {
|
||||
"resolved": "sender",
|
||||
"prefix": "rmass_dmtest_",
|
||||
},
|
||||
},
|
||||
{
|
||||
"keytitle": "visibility",
|
||||
"keyvalue": "private",
|
||||
},
|
||||
{
|
||||
"keytitle": "preset",
|
||||
"keyvalue": "private_chat",
|
||||
},
|
||||
{
|
||||
"keytitle": "is_direct",
|
||||
"keyvalue": True,
|
||||
},
|
||||
{
|
||||
"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",
|
||||
]
|
||||
|
||||
headers = {
|
||||
"Authorization": {
|
||||
"os": "AS_TOKEN",
|
||||
"prefix": "Bearer ",
|
||||
},
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
|
||||
outputs = {
|
||||
"room_id": "room_id",
|
||||
}
|
||||
Reference in New Issue
Block a user