Page MenuHomePhabricator

[lib] introduce notificationCollapseKey function to reaction message spec
ClosedPublic

Authored by ginsu on Dec 14 2022, 2:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 5:51 AM
Unknown Object (File)
Tue, Nov 5, 7:26 AM
Unknown Object (File)
Tue, Nov 5, 7:26 AM
Unknown Object (File)
Tue, Nov 5, 7:26 AM
Unknown Object (File)
Fri, Nov 1, 6:23 PM
Unknown Object (File)
Oct 28 2024, 1:00 AM
Unknown Object (File)
Oct 17 2024, 7:06 PM
Unknown Object (File)
Sep 28 2024, 4:55 AM
Subscribers

Details

Summary

introduce notificationCollapseKey function to reaction message spec. For this method, I returned the joined result of the type, threadID, creatorID, and targetMessageID fields. By using these fields, a notification will be collapsed and won't alert the user if someone is quickly liking and then unliking the same message. I felt that this was reasonable, but can also see that we might want to remove targetMessageID from the joined results to make it less "spammy" if a user likes a bunch of messages in the same thread.


Depends on D5870
Linear Task: ENG-2245

Test Plan

Please watch the demo video to see the changes I made

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Dec 14 2022, 2:14 PM

For me it makes sense to keep targetMessageID. One alternative might be to have a notification telling that a user liked x messages in thread ..., but I don't think it will be too useful. Yet another option might be to have a setting which allows users disabling reaction notifications. @ashoat what do you think?

I think this is a good approach for now, and we can revisit later if we find that it's spammy. Another approach would be to only deliver notifs to the author of the message, which is the same thing we do for threads (but only because the author of the target message is auto-added to the thread).

For reactions, I think limiting notifs to only deliver to the author of the message is blocked on extending generatesNotifs to be more sophisticated, which is related to this discussion.

This revision is now accepted and ready to land.Dec 15 2022, 7:26 AM

Task to track improvements of reaction message notifications