Requests for comment/Notification framework

Proposal

 * 32281 - central tracking-ish bug
 * dependency tree

... work in progress ...

Background
MediaWiki's original discussion system was based on fairly ad-hoc editing conventions, breaking 'Talk:' namespaces out from their sibling pages. Edits to 'User talk:' pages trigger a single "You have new messages!" notification flag, but this system cannot show any more detail such as how many messages, who left them, or what they contain. It also can't be easily extended to other sources of notification.

Extension:LiquidThreads adds its own threaded discussion system with a sort of concept of subscriptions / reply routing, such that replies to you on any threaded discussion can get routed to a similar "You have N new messages!" notification.

This is a good start, but should be generalized and available in MediaWiki core.

Things like "welcome to the site!", "your background upload is complete", "transcode of your video is complete", "your page has been deleted", etc would be very useful to have available as notifications; today they tend to get done as user-talk page sections by bot or JavaScript tools, which is awkward.

Cross-wiki
It would make our lives much, much, MUCH simpler if we can make this a unified service that works across multiple wikis (with Extension:CentralAuth and friends), so you get a single set of notifications without having to jump around sites.

Notification format
Definitely:
 * localizable text w/ parameters - short-form (email subject, title of mobile notification, line in drop-down menu in web UI)
 * localizable text w/ parameters - long-form (email body, click-through details on mobile or web)

Possibly:
 * some sort of categorization for filtering?
 * some sort of urgency?
 * some sort of hookup to the source to make it easy to reply, followup, whatever appropriate?

Email
Some things can trigger email notifications, including the things that will trigger user-talk notifications today; but also other events may trigger emails such as Extension:CodeReview's followup notifications.

These should be brought into the common notification system so they're available over non-email channels, and so that the email channels include relevant information (such as the *content* of a message!)


 * 32285 Email backend for notifications to supplement/consolidate enotif with common notification infrastructure

Web UI
The existing new messages links in the dynamically-generated web UI of MediaWiki will need to be updated to read from the central whatsit.

API
An API interface to poll for new messages would be useful for extending the front-end web UI so that you still see notifications even if you're on a page for a long time (say you're editing long text, or using an AJAX-y interface for page patrolling).

This would also be a first step for mobile apps and other tools to hook into the same interface.

(Further enhancement could be done with WebSockets or long-polling techniques, but may require server-side support for long-running connections.)


 * 32283 API point for polling notification data
 * 32284 Show live talk & other notification updates in web UI
 * 32292 Show watchlist & talk notifications in MobileFrontend web UI

Mobile push notifications
Various mobile operating systems like Apple's iOS and Google's Android have message proxying systems that allow an application to register to efficiently listen for notifications sent through an intermediary service, even when the application has been closed to save memory & power.

Backends to set up the device subscriptions and send pings through the proxy will be a benefit here.


 * 32288 Android cloud-to-device messaging server-side
 * 32289 Android app support
 * 32287 iOS push notifications server-side
 * 32291 iOS app support

User-to-user messaging

 * user talk (traditional)
 * Extension:LiquidThreads replies
 * Extension:CodeReview reply notifications
 * Special:Emailuser generalization?
 * proposed 30750 notification when @ in edit summary / talk?

System-to-user messaging

 * upload-by-URL backgrounding
 * Extension:TimedMediaHandler transcode completion
 * 29857 Welcome back email notification after renewed account activity
 * 29856 Email notification when verified email address is changed or removed

User activity

 * new user welcome
 * 27829: welcome users without relying on talk edition [See dependency tree for bug 27829]
 * Extension:CodeReview followup notifications
 * other users' edits: watchlist or watchlist supplement (high-priority items?)
 * someone deletes or marks your page for deletion
 * someone uses / removes your image