Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Server annoucements #11006
A lot of servers admins currently struggle making sure everyone is informed on what are new on their Fediverse node. Even if there is an admin account being followed by the whole instance, regular announcements from the admins, a lot of people can be left aside and don't understand the changes.
I would suggest a new feature for admins to be able to make announcements to their users, trough an API and trough the WebUI, like a little column you can open with "news" and persistent notification until read.
Code-wise I don't really know what would be the best for it, since it would take a lot of space to track down every announcements read by users I suggest having an simple number you increase, like there is 5 announcements made since the beginning, and your "number" is 4, it mean there is still one announcement you missed.
The list of announces would be retrievable trough an endpoint, and another endpoint to update the "read state".
fwiw, it's pretty easy to do some worse-is-better forms of this through the console. Here's one I used last week to make sure everyone saw my downtime announcement:
status = Status.find(102240578345992723) Account.local.select(:id).reorder(nil).find_in_batches do |followers| FeedInsertWorker.push_bulk(followers) do |follower| [status.id, follower.id, :home] end end
It's done like this in pretty much all communities softwares, seeing what changed, what are the latest stuff, etc.
Your idea of pushing a notification to everyone might be nice, but it will be drown into plenty of notifications, maybe just adding a custom notification with a "pop out" layout might be better than solely a tiny part made only for announcements indeed...
I think that banner notifications (across the top of the site) are nice and obvious, without being too obtrusive.
I don't know how Mastodon's database structure is, but I would think storing notifications in their own table, and whether a user has acknowledge the notification in a related table, would be simple enough. Each notification would have its own id. If you want the notification to be dismissable simply require the user dismiss it manually by clicking a button (an "X" or a link that says "dismiss" or something).
To determine whether to display the notification, check if it's dismissable and hasn't been dismissed already.
I mention the dismissable thing because sometimes you don't want users be able to dismiss a message, such as "Server will be down for maintenance at such and such time" or something. I don't know if preventing dismissal would be an accessibility issue or if users would just think it was obnoxious, though.
Admins could also have dedicated accounts for updates to the server, which users could be set to follow by default (such as @Mastodon@mastodon.social on Mastodon.social). This wouldn't even need any changes, although making sure people see its posts would be a challenge, as @Miaourt mentioned.