Made get room alias an RMASS Bridge function instead of an admin function
This commit is contained in:
@@ -4,34 +4,20 @@ kind = "action"
|
|||||||
|
|
||||||
showstatus = True
|
showstatus = True
|
||||||
|
|
||||||
#recursive = {
|
## PRE-RUNTIME ACTIONS
|
||||||
# "source": "getmessage",
|
|
||||||
# "reverse": True,
|
|
||||||
# "label": "messageitem",
|
|
||||||
#}
|
|
||||||
|
|
||||||
resolve = {
|
resolve = {
|
||||||
"get": {
|
"get": {
|
||||||
#"sender": ["messageitem", "senderId"],
|
|
||||||
#"event_id": ["messageitem", "id"],
|
|
||||||
#"message_body": ["events", 0, "content", "body"],
|
|
||||||
"room_id": ["outmessageitem", "room_id"],
|
"room_id": ["outmessageitem", "room_id"],
|
||||||
#"timestamp": ["events", 0, "original_server_ts"],
|
# "matrix_sender": ["outmessageitem", "sender"],
|
||||||
|
# "msg_type": ["outmessageitem", "type"],
|
||||||
|
# "echo_tag": ["outmessageitem", "content", "com.loxthelion.rmass_message_id"],
|
||||||
},
|
},
|
||||||
# "construct": {
|
|
||||||
# "matrixuser": [
|
|
||||||
# "@rmass_",
|
|
||||||
# {"resolved": "sender"},
|
|
||||||
# ":loxthelion.com",
|
|
||||||
# ],
|
|
||||||
# },
|
|
||||||
# "transform": {
|
|
||||||
# "matrixuser": {
|
|
||||||
# "@lyncoln:loxthelion.com": "@rmass_238302:loxthelion.com",
|
|
||||||
# },
|
|
||||||
# },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## RUNTIME ACTIONS
|
||||||
|
|
||||||
|
isrequest = True
|
||||||
|
|
||||||
method = "GET"
|
method = "GET"
|
||||||
|
|
||||||
@@ -39,16 +25,46 @@ path = [
|
|||||||
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
"https://loxthelion.com/_matrix/client/v3/rooms/",
|
||||||
{"resolved": "room_id"},
|
{"resolved": "room_id"},
|
||||||
"/state/m.room.canonical_alias",
|
"/state/m.room.canonical_alias",
|
||||||
|
"?user_id=%40rmass_bridge%3Aloxthelion.com"
|
||||||
]
|
]
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"Authorization": {
|
"Authorization": {
|
||||||
"os": "ADMIN_TOKEN",
|
"os": "AS_TOKEN",
|
||||||
"prefix": "Bearer ",
|
"prefix": "Bearer ",
|
||||||
},
|
},
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## POST-RUNTIME ACTIONS
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
"room_name": "alias"
|
"room_alias": "alias"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#filters = [
|
||||||
|
# {
|
||||||
|
# "filterkey": "outmessageitem",
|
||||||
|
# "operator": "in",
|
||||||
|
# "filtervalue": "state_key",
|
||||||
|
# "print": f"Excluding state.key event during {name}",
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "filterkey": "matrix_sender",
|
||||||
|
# "operator": "!=",
|
||||||
|
# "filtervalue": "@lyncoln:loxthelion.com",
|
||||||
|
# "print": f"Excluding message loop item during {name}",
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "filterkey": "msg_type",
|
||||||
|
# "operator": "!=",
|
||||||
|
# "filtervalue": "m.room.message",
|
||||||
|
# "print": f"Excluding non-room message event during {name}",
|
||||||
|
# },
|
||||||
|
# {
|
||||||
|
# "filterkey": "echo_tag",
|
||||||
|
# "operator": "is not",
|
||||||
|
# "filtervalue": None,
|
||||||
|
# "print": f"Excluding imported message event during {name}",
|
||||||
|
# },
|
||||||
|
#]
|
||||||
|
|||||||
Reference in New Issue
Block a user