Created
February 25, 2024 09:30
-
-
Save iamtalhaasghar/01d8748243273038a821f42cc9902a89 to your computer and use it in GitHub Desktop.
Send server notice msg as an admin to any user in your synapse / matrix homeserver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prompts by https://gist.github.com/iamtalhaasghar | |
# Written by Chatgpt | |
# 25-Feb-2024 | |
curl -X POST \ | |
-H "Authorization: Bearer <your_access_token>" \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"user_id": "@<target_user>:<server_domain>", | |
"content": { | |
"msgtype": "m.text", | |
"body": "THIS IS A SERVER NOTICE" | |
} | |
}' \ | |
https://<server_url>/_synapse/admin/v1/send_server_notice |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is an issue open to send messages to all users instead of one specific user. element-hq/synapse#5501