HomePhabricator
Diffusion Comm a8e7d97f2be9

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

Description

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

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"

Reviewers: atul, ginsu

Reviewed By: atul

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D6866

Details

Provenance
ashoatAuthored on Feb 21 2023, 1:38 PM
Reviewer
atul
Differential Revision
D6866: [keyserver] Check all new messages for @-mention notif override
Parents
rCOMMe2ca77f62c9d: [keyserver] Stop persisting `primaryIdentityPublicKey` from `login` request
Branches
Unknown
Tags
Unknown