Page MenuHomePhabricator

Deprecate `AbortEmailNotification` hook
Closed, ResolvedPublic

Description

As ENotif uses the MediaWiki Notification system, we should deprecate AbortEmailNotification hook and let extensions dismiss the watchlist notification via Middleware system we introduced in https://phabricator.wikimedia.org/T387996

Notes:
Multiple extensions use this hook: https://codesearch.wmcloud.org/search/?q=(\b|on)AbortEmailNotification
The use cases are:

  • Flow - to stop notifications from flow board.
  • SubpageWatchlist - looks like it's overriding ENotif and sends custom email
  • Translate blocks sending notifications for RecentChanges with rc_log_type set to translationreview
  • WikiBase - blocks sending notifications for RecentChanges with rc_source set to Wikibase

Details

Event Timeline

Blocked on T387996 - In order to deprecate hook we need to provide a replacement.

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

[mediawiki/extensions/Translate@master] Use middleware instead of AbortEmailNotification hook

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

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

[mediawiki/extensions/Wikibase@master] The AbortEmailNotificationHook gets deprecated, use Middleware instead

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

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

[mediawiki/extensions/Flow@master] Use middleware instead of AbortEmailNotification hook

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

(I'm untagging some projects since there are now subtasks for every team, so this task doesn't have to clutter everyone's workboard, and the subtasks can be removed from Platform team's workboard as well.)

(There's no subtask for SubpageWatchlist, because it doesn't seem to have a Phab project, and may be abandoned. I complained at https://www.mediawiki.org/wiki/Extension_talk:SubpageWatchlist.)

The only remaining extension is Extension:SubpageWatchlist, everything else is migrated. Bawolff is not actively maintaining that (per @matmarex thread - https://www.mediawiki.org/wiki/Extension_talk:SubpageWatchlist ).

I think we can hard-deprecate this hook now.

Change #1170625 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Deprecate the AbortEmailNotification Hook

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

This work is blocked on the release cycle in Translate extension. We have to wait for MLEB release (should happen within a couple of months: source https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Translate/+/1169240/comments/9056019d_985d3b67?tab=comments), and only after that we can merge the remaining changes.

Change #1170625 merged by jenkins-bot:

[mediawiki/core@master] Deprecate the AbortEmailNotification Hook

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