50 lines
873 B
Python
50 lines
873 B
Python
import os
|
|
|
|
name = "Synapse User Registration"
|
|
|
|
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": "type",
|
|
"keyvalue": "m.login.application_service",
|
|
},
|
|
{
|
|
"keytitle": "username",
|
|
"keyvalue": {
|
|
"resolved": "sender",
|
|
"prefix": "rmass_"
|
|
},
|
|
},
|
|
{
|
|
"keytitle": "inhibitlogin",
|
|
"keyvalue": True,
|
|
},
|
|
]
|
|
|
|
method = "POST"
|
|
|
|
path = "https://loxthelion.com/_matrix/client/v3/register"
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"os": "AS_TOKEN",
|
|
"prefix": "Bearer ",
|
|
},
|
|
"Content-Type": "application/json",
|
|
}
|
|
|
|
outputs = {
|
|
"user_id": "user_id",
|
|
}
|