Page MenuHomePhabricator

User::getNewMessageLinks can return Revision objects
Closed, ResolvedPublic

Description

User::getNewMessageLinks returns an array, which includes a Revision if the user has a new message

None of the known callers outside of core actually use the Revision that is returned; I would suggest making a breaking change to simply return RevisionRecord objects instead

Alternatively, this may make sense to move to the TalkPageNotificationManager, but it relies on WikiMap::getCurrentWikiId() which would force the service to only apply to a specific wiki. Perhaps move it to the service, with the User and the wikiid being parameters?

Event Timeline

DannyS712 triaged this task as Medium priority.May 29 2020, 3:38 AM
DannyS712 created this task.

See https://gerrit.wikimedia.org/r/c/mediawiki/core/+/596502 - we opted for just removing the use of this method entirely. Should probably do the same in other occurrences if they exist

See https://gerrit.wikimedia.org/r/c/mediawiki/core/+/596502 - we opted for just removing the use of this method entirely. Should probably do the same in other occurrences if they exist

So just hard deprecate the entire method?

So just hard deprecate the entire method?

Yup, that was the plan.

Change 599593 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] User::getNewMessageRevisionId - remove use of User::getNewMessageLinks

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

DannyS712 moved this task from Unsorted to In progress on the User-DannyS712 board.

Change 599593 merged by jenkins-bot:
[mediawiki/core@master] Deprecate User::getNewMessageRevisionId

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

Pchelolo closed this task as Resolved.Jun 9 2020, 3:08 AM

I think since the method was deprecated the task can be closed.

DannyS712 reopened this task as Open.Jun 9 2020, 8:17 AM

I think since the method was deprecated the task can be closed.

User::getNewMessageLinks wasn't deprecated, User::getNewMessageRevisionId was

Change 604219 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Hard deprecate User::getNewMessageLinks

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

Change 604219 merged by jenkins-bot:
[mediawiki/core@master] Hard deprecate User::getNewMessageLinks

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

DannyS712 closed this task as Resolved.Jun 10 2020, 3:45 AM
DannyS712 removed a project: Patch-For-Review.