Page MenuHomePhabricator

[keyserver] Only bump last_message_for_unread_check for certain message types
ClosedPublic

Authored by ashoat on Feb 11 2025, 12:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 22, 9:05 AM
Unknown Object (File)
Mon, Mar 17, 9:41 PM
Unknown Object (File)
Mon, Mar 17, 9:33 PM
Unknown Object (File)
Fri, Mar 14, 6:15 AM
Unknown Object (File)
Fri, Mar 14, 5:11 AM
Unknown Object (File)
Fri, Mar 14, 5:03 AM
Unknown Object (File)
Fri, Mar 14, 4:38 AM
Unknown Object (File)
Fri, Mar 14, 4:29 AM
Subscribers
None

Details

Summary

This diff makes it so for keyserver-hosted messages, we only bump last_message_for_unread_check for messageNotifyTypes.SET_UNREAD and messageNotifyTypes.NOTIF_AND_SET_UNREAD.

It has the immediate effect of preventing last_message_for_unread_check from being bumped for messageNotifyTypes.RESCIND, which is used for un-reacts to an author's message.

In later diffs we will introduce messageNotifyTypes.NONE to several message specs, which will achieve ENG-9557.

Depends on D14336

Test Plan

In combination with later diffs, tested the following for a thin thread:

  1. Log in as two users, one on iOS and one on Android
  2. On iOS, bump an unrelated thread not used for testing, so the testing thread is not the latest
  3. On Android, react to a message authored by the Android user in the testing thread. Confirm that on iOS, the thread does not appear as unread, it is not bumped in the thread list, and the MessagePreview does not update
  4. Do the same while the iOS app is backgrounded, and confirm a notif is not generated
  5. Do steps 2-4 again, but this time on Android react to a message authored by the iOS user. Confirm that the thread appears unread, is bumped in the thread list, the MessagePreview updates, and a notif is sent (if the iOS app is backgrounded)
  6. Test adding a user, removing a user, having a user leave, and having a user join. Confirm that these actions don't make the thread appear as unread

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Feb 11 2025, 9:29 AM