mirror of
https://github.com/bsedin/matrix-webhook.git
synced 2026-04-09 11:25:40 +00:00
join room before sending message
This commit is contained in:
@@ -76,6 +76,11 @@ async def matrix_webhook(request):
|
||||
else:
|
||||
formatted_body = markdown(str(data["body"]), extensions=["extra"])
|
||||
|
||||
# try to join room first -> non none response means error
|
||||
resp = await utils.join_room(data["room_id"])
|
||||
if resp is not None:
|
||||
return resp
|
||||
|
||||
content = {
|
||||
"msgtype": "m.text",
|
||||
"body": data["body"],
|
||||
|
||||
Reference in New Issue
Block a user