Page MenuHomePhabricator

Ensure duplicate notifications are *not* sent for the same talk page event
Closed, ResolvedPublic

Description

This task is about making sure people do not receive multiple notifications for a single signed talk page edit.

In this task we are considering "topic subscription" and "mention" events. (There are also "user talk" events, but those will be considered elsewhere).

Desired behavior

  1. IF at "Time 1" Marcus subscribes to "Topic A"
  2. AND at "Time 2" Ashley posts a new comment in "Topic A" and mentions Marcus in said comment
  3. THEN at "Time 2" Marcus should receive ONE notification alerting him that Ashley has mentioned him in a comment.

Done

  • The Desired behavior is implemented

Event Timeline

ppelberg moved this task from Incoming to Upcoming on the Editing-team (Kanban Board) board.
ppelberg moved this task from Backlog to Triaged on the DiscussionTools board.
ppelberg updated the task description. (Show Details)

@Catrope's notes from offline conversations:

  • Change Echo so that DT can hook in and selectively suppress Echo mention notifs that it knows will be duplicative of reply notifications it has sent / will send
    • Make EchoDiscussionParser::generateEventsForRevision() generate an array of event data arrays, then run them through a hook that lets DT modify them, only then issue the events with EchoEvent::create()
    • Hook into this in DT, and remove mention recipients who will receive a reply notification
  • Make DT suppress all Echo mention events when it's installed, and take over mentions completely
    • DT could have its own mention presentation model, or use Echo's (by having DT generate events of type 'mention', which Echo registers a presentation model for)

What about simply dropping the DT notification if we know the user will get a mention notification anyways? Mention is a notification type Echo already handles, so implementing it in DT seems reinventing the wheel to me.

What about simply dropping the DT notification if we know the user will get a mention notification anyways? Mention is a notification type Echo already handles, so implementing it in DT seems reinventing the wheel to me.

Yes - we can choose between either of the notifications. I will prioritise the mention notification for now because I think it is more specific information to present to the user.

Change 670498 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/Echo@master] Introduce 'EchoGetEventsForRevision' hook

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

Change 670498 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Introduce 'EchoGetEventsForRevision' hook

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

Test wiki created on Patch Demo by PPelberg (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/77cda30f9d/w/

Test wiki on Patch demo by PPelberg (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/77cda30f9d/w/