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)
Tue, Dec 3, 4:08 AM
Unknown Object (File)
Oct 27 2024, 1:54 PM
Unknown Object (File)
Oct 19 2024, 12:45 PM
Unknown Object (File)
Oct 18 2024, 5:16 AM
Unknown Object (File)
Sep 27 2024, 5:55 PM
Unknown Object (File)
Sep 27 2024, 5:55 PM
Unknown Object (File)
Sep 27 2024, 5:55 PM
Unknown Object (File)
Sep 27 2024, 5:49 PM
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