HomePhabricator
Diffusion Comm b78c6f05fcb3

[keyserver][lib] Pass notifTargetUserInfo to notificationTexts

Description

[keyserver][lib] Pass notifTargetUserInfo to notificationTexts

Summary:
Today, each MessageSpec's notificationTexts actually has no awareness of the user that is being sent the notif.

Some message types (eg. relationship, reaction) use terms like "you", but don't need to check the userID since the notif is only ever generated for one user. For example, since we know only that reactions only send notifs to the original message author, we can say "your message" in the notif without checking who is receiving the notif.

Other message types that you might expect would need awareness of the notif recipient (join thread, leave thread, add users, remove users) don't actually generate notifs.

In a following diff, I'm going to introduce a notif where we will need this data. In particular, we're going to add "and tagged you" to some notifs when the recipient user was tagged, and to do that we need to know about the recipient user.

Depends on D6872

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/D6873

Details

Provenance
ashoatAuthored on Feb 22 2023, 1:18 PM
Reviewer
atul
Differential Revision
D6873: [keyserver][lib] Pass notifTargetUserInfo to notificationTexts
Parents
rCOMM9a53f51d3c24: [keyserver] Update notif prepare functions to take bag of params
Branches
Unknown
Tags
Unknown