Page MenuHomePhabricator

[keyserver][lib] Pass notifTargetUserInfo to notificationTexts
ClosedPublic

Authored by ashoat on Feb 23 2023, 1:17 PM.
Tags
None
Referenced Files
F2113336: D6873.id.diff
Wed, Jun 26, 3:31 AM
F2113302: D6873.diff
Wed, Jun 26, 3:25 AM
Unknown Object (File)
Tue, Jun 11, 10:30 PM
Unknown Object (File)
Thu, May 30, 4:10 AM
Unknown Object (File)
Thu, May 30, 4:10 AM
Unknown Object (File)
May 26 2024, 9:06 AM
Unknown Object (File)
May 23 2024, 2:39 AM
Unknown Object (File)
May 10 2024, 11:35 PM
Subscribers

Details

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"

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable