Currently, there is no common way to specify the Event recipient in Echo extension. For every Event we need to identify the correct UserLocator which sometimes may be confusing or difficult to track.
In most, if not all cases, the caller already knows all recipients. MediaWiki Notifications expects Recipients to be passed when triggering a new Notification.
Some Echo notifications already expect list of recipients under extra array, for example:
- extra['recipients'] in api-alert and api-notice
- extra['reverted-user-id'] in reverted
- extra['mentioned-users'] in mention-summary and mention
Decide on the approach:
- do we implement a default user locator that would read from extra['recipients'] (reuse locateFromEventExtra) ?
- do we use a different key?
- do we abandon the use of UserLocator and if recipients key is present, just use it