Page MenuHomePhabricator

Provide a generic way to pass a recipients for Echo notification
Closed, ResolvedPublic

Description

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

Event Timeline

pmiazga renamed this task from Provide a generic Recipient for Echo notification to Provide a generic way to pass a recipients for Echo notification.Jan 29 2025, 3:27 PM

Change #1117981 had a related patch set uploaded (by Pmiazga; author: Pmiazga):

[mediawiki/extensions/Echo@master] Provide a generic way to pass recipients along with event

https://gerrit.wikimedia.org/r/1117981

Change #1118479 had a related patch set uploaded (by Pmiazga; author: Pmiazga):

[mediawiki/extensions/Echo@master] DNM: Switch `emailuser` notification to default locator

https://gerrit.wikimedia.org/r/1118479

Change #1117981 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Provide a generic way to pass recipients along with event

https://gerrit.wikimedia.org/r/1117981

matmarex removed a project: Patch-For-Review.
matmarex subscribed.

Change #1118479 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Switch `emailuser` notification to default locator

https://gerrit.wikimedia.org/r/1118479

Change #1123425 had a related patch set uploaded (by Pmiazga; author: Pmiazga):

[mediawiki/extensions/Echo@master] feat: default recipient locator should be always present

https://gerrit.wikimedia.org/r/1123425

Change #1123425 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] feat: default recipient locator should be always present

https://gerrit.wikimedia.org/r/1123425