The following methods should be factored out into a stateless service, WatchlistNotificationManager:
- User::clearNotification
- Title::getNotificationTimestamp
The new service would wrap a WatchedItemStore and a TalkPageNotificationManager (T239640).
The following methods should be factored out into a stateless service, WatchlistNotificationManager:
The new service would wrap a WatchedItemStore and a TalkPageNotificationManager (T239640).
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T208764 Remove cyclic dependency between Title and User classes | |||
| Resolved | DannyS712 | T208777 Factor notification-related methods out of User and Title, introduce WatchlistNotificationManager | |||
| Resolved | • Clarakosi | T239640 Introduce TalkPageNotificationManager service | |||
| Resolved | DannyS712 | T253435 UserClearNewTalkNotification hook: document UserIdentity instead of User |
We should probably also revive T208766: Deprecate User::isWatched, isTempWatched, addWatch, and removeWatch
+1
@Vedmaka are you working on this?
I'm picking this up under Clinic Duty but do let me know if you were already working on it.
I was working on it at a preliminary level :) If you want me to do this, feel free to assign it to me
Notes:
User::clearAllNotifications should probably also be moved
Suggest waiting until after HookContainer/HookRunner migrations, since User::clearNotification runs a hook
Services to be injected:
I was working on it at a preliminary level :) If you want me to do this, feel free to assign it to me
Assigning it to you :)
More notes:
User::clearNotification accepts a title by reference - why? It doesn't appear to be replaced, so accepting it as a value should be enough
New service should only need UserIdentity and LinkTarget, rather than User and Title
Title::getNotificationTimestamp includes its own caching - since the new service has to cache values for a user-title combination, rather than a title caching values for a user, the caching logic will be a bit trickier
Change 598150 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add new WatchlistNotificationManager service
Change 598150 merged by jenkins-bot:
[mediawiki/core@master] Add new WatchlistNotificationManager service
Change 602493 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] WatchlistNotificationManager: Add deprecations and release notes
Change 602493 merged by jenkins-bot:
[mediawiki/core@master] WatchlistNotificationManager: Add deprecations and release notes
Follow-up to replace uses it at T254542: Replace uses of deprecated User and Title methods with WatchlistNotificationManager