Page MenuHomeTelepedia

Allow maintenance and other important notices to be served through Echo
Open, Needs TriagePublic

Description

An extension such as the Announcements feature on Fandom would be useful to incorporate in order to send important announcements such as maintenance windows etc., through Echo. This would reduce the need for annoying sitenotices, which reappear all of the time.

Event Timeline

image.png (1×2 px, 157 KB)

The current working proposal is attatched. This allows people with the right "announcements-manage" to both send, view, and expire announcements. At the minute, there is no function to expire the announcement. This will more than likely require an API endpoint, in which jQuery can call to expire an announcement when the expire button is clicked. Validation is provided on the title, description, and link—an extra variable $wgAnnouncementsAllowExternal is available (BOOL, default FALSE). When set to true, it will allow the announcement to link to websites outside of the domain (ie. google.com from a *.telepedia.net domain); this should increase security.

The prototype does not include any caching, but here are the thoughts on the process:

  • Cache the announcements in Redis (or whatever cache), for the maximum period of time; this means that everytime someone visits S:Announcements, it isn't calling the DB again.
  • Use the job queue to send the Echo notification; also provide variable $wgAnnouncementUseJQ which will be useful if wikis have disabled the JQ and run it via cron; we don't want notifications being stuck and all ran at night.
  • Add timestamps for the announcement and when it is expired.

Theoretically, there shouldn't be any calls to the database after the announcment is sent. When the announcement is sent, it is inserted into the DB, and then passed to echo to deliver. The only time a database write/read should happen is when a new announcement is sent and the old one expired. This should also drop the cache.