Page MenuHomePhabricator

[keyserver] Check all new messages for @-mention notif override
ClosedPublic

Authored by ashoat on Feb 23 2023, 1:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 3:43 AM
Unknown Object (File)
Fri, Apr 12, 5:39 AM
Unknown Object (File)
Sun, Mar 31, 8:13 AM
Unknown Object (File)
Sun, Mar 31, 8:13 AM
Unknown Object (File)
Sun, Mar 31, 8:12 AM
Unknown Object (File)
Sun, Mar 31, 8:06 AM
Unknown Object (File)
Feb 21 2024, 9:07 AM
Unknown Object (File)
Feb 21 2024, 9:07 AM
Subscribers

Details

Summary

Before this diff, if multiple new messages are created at the same time with the same collapse key, we would only check the first one to see if notif settings should be overriden due to an @-mention.

After this diff, in that scenario we will check all of the new messages (but not the "existing messages", for which notifs have already been delivered).

The scenario where multiple new messages are created at the same time with the same collapse key actually does not occur currently in the app. However, in one of the following diffs I will make SIDEBAR_SOURCE and CREATE_SIDEBAR share the same collapse key, and since they are created at the same time, it will be possible for a SIDEBAR_SOURCE to have an @-mention. If that occurs, the SIDEBAR_SOURCE will not be the first message, so we want to make sure we check all of the new messages with the same collapse key.

Test Plan

In combination with the rest of the stack, I confirmed that a sidebar started in response to a text message that @-mentions somebody will result in the @-mentioned user receiving a custom notif that ends with "that tagged you"

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

The scenario where multiple new messages are created at the same time with the same collapse key actually does not occur currently in the app. However, in one of the following diffs I will make SIDEBAR_SOURCE and CREATE_SIDEBAR share the same collapse key, and since they are created at the same time, it will be possible for a SIDEBAR_SOURCE to have an @-mention. If that occurs, the SIDEBAR_SOURCE will not be the first message, so we want to make sure we check all of the new messages with the same collapse key.

Thanks for flagging this

This revision is now accepted and ready to land.Feb 24 2023, 2:33 AM