Open rxl881 opened 5 years ago
be aware that such an implementation for "motd" would mean: (a) users that register after the server_notice spam wouldn't receive the motd; (b) users that don't log in between server_notice spams would get all the notices at once when they do log in, which might be a bit confusing.
a) Isn't an issue from my POV (as I would expect it to work). b) Noted, but similarly to a), this is probably a feature - "these are the important, system-wide, things that happened since you last logged in". Hopefully they will be very rare, and can be easily marked as read / discarded as it's just one room.
It would be an excellent opportunity for the server admin to send messages to all the local users.
Does it really need to be an API? https://github.com/Awesome-Technologies/synapse-admin/ can be used to send notices to multiple recipients at once.
Does it really need to be an API? https://github.com/Awesome-Technologies/synapse-admin/ can be used to send notices to multiple recipients at once.
Great! Thank you. After the installation, I should set an Nginx reverse proxy to point http://localhost:8080 to a different address. Is it so?
Does it really need to be an API? https://github.com/Awesome-Technologies/synapse-admin/ can be used to send notices to multiple recipients at once.
then you run into Awesome-Technologies/synapse-admin#90
It would be an excellent opportunity for the server admin to send messages to all the local users.
This API have to be async because send messages to all users of a server can take a while.
This would be great, right now I am using a python3 script I found to message all users but it has to run at the rate limit. A tool to message all users without having to wait would be much better.
Would also love for the ability to do this. Perhaps allowing for a "*" in the json content passed to the POST /_synapse/admin/v1/send_server_notice call
I would also welcome this feature, but as it wasn't there I implemented this functionality for synadm
last summer: https://github.com/JOJ0/synadm/pull/74
So if someone of you is using synadm (a very nice wrapper of the admin API), just use this module for sending notices :)
It would be amazing if Synadm could be merged into the Synapse system or at least hosted within the matrix-org organisation on GitHub.
I agree. A use case for this is on the off change that some maintenance is needed and you wish to notify users about downtime.
This doesn't seem to work, I assume because system_mxid_localpart
isn't a "real" user.
No, but you can disable rate limiting for yourself / the admin account to use it to call the admin API repeatedly for everyone
While that totally makes sense (and I feel like I shouldn't have missed that 😛), I actually have both in ratelimit_override
and I'm still running into the rate limit.
user_id | messages_per_second | burst_count
----------------------------+---------------------+-------------
@root:mymatrixdomain.net | 0 | 0
@system:mymatrixdomain.net | 0 | 0
{"errcode":"M_LIMIT_EXCEEDED","error":"Too Many Requests","retry_after_ms":2150}
And I restarted Synapse, just to be sure.
It might be because of this https://github.com/matrix-org/synapse/issues/11785
Also see #15974
(It seems that there have been previous issues to track this, but all appeared to be closed at the moment)
Admin APIs exist to send server notices to users - https://github.com/matrix-org/synapse/blob/master/docs/admin_api/server_notices.md (, and https://github.com/matrix-org/synapse/blob/master/docs/server_notices.md for more generic info. on server notices and their expected use). However, at present it only allows for messages to be sent to specific users.
It would be very useful to be able to send messages to all local users (e.g. for "Messages of the day" or policy updates etc.).
Can we please open up the existing API to send to all users matching a pattern (including '.*'), or create a new endpoint to allow for this?