Page MenuHomePhabricator

[lib] Use notificationCollapseKey to dedup sidebarCreation notifs in multimediaMessageSpec
ClosedPublic

Authored by ashoat on Feb 11 2025, 12:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 15, 10:52 PM
Unknown Object (File)
Tue, Mar 11, 4:12 PM
Unknown Object (File)
Tue, Mar 11, 3:48 PM
Unknown Object (File)
Mar 2 2025, 7:31 AM
Unknown Object (File)
Feb 25 2025, 10:01 PM
Unknown Object (File)
Feb 25 2025, 7:31 AM
Unknown Object (File)
Feb 25 2025, 7:29 AM
Unknown Object (File)
Feb 22 2025, 6:10 PM
Subscribers
None

Details

Summary

In the next diff, we'll remove the MessageData parameter from getMessageNotifyType. We want to do this because for DMs, we need to call this function on the recipient's side in order to determine whether to set a thread to unread. But the recipient does not have access to the MessageData.

The only place where we need the MessageData in getMessageNotifyType is multimediaMessageSpec. This usage was introduced in D6798 to prevent double-notifs on sidebar creation in both textMessageSpec and multimediaMessageSpec. However, in D6938 we introduced an alternative approach to prevent double-notifs in textMessageSpec; this diff uses the same approach for multimediaMessageSpec.

Depends on D14339

Test Plan
  • Tested creating a sidebar from a non-viewer message with a multimedia message, and confirmed it only sent 1 notif to the other user in the sidebar (the author of the sidebar source message)
  • Tested sending a normal multimedia and confirmed that it still sent a notif

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable