Page MenuHomePhabricator

[lib] Only set DM threads to unread for certain message types
ClosedPublic

Authored by ashoat on Feb 11 2025, 12:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 22, 9:11 AM
Unknown Object (File)
Mon, Mar 17, 9:32 PM
Unknown Object (File)
Mon, Mar 17, 9:20 PM
Unknown Object (File)
Mon, Mar 17, 6:40 PM
Unknown Object (File)
Sat, Mar 15, 7:19 AM
Unknown Object (File)
Fri, Mar 14, 5:50 AM
Unknown Object (File)
Fri, Mar 14, 5:30 AM
Unknown Object (File)
Fri, Mar 14, 4:22 AM
Subscribers
None

Details

Summary

This is the DM equivalent of the earlier keyserver change. It makes DMs respect getMessageNotifyType: if that function does not return messageNotifyTypes.SET_UNREAD or messageNotifyTypes.NOTIF_AND_SET_UNREAD for a given message, then that message will not set the thread to unread.

Depends on D14342

Test Plan

In combination with later diffs, tested the following for a thick 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

  1. Do the same while the iOS app is backgrounded, and confirm a notif is not generated
  2. 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 up

dates, and a notif is sent (if the iOS app is backgrounded)

  1. Test adding a user, removing a user, having a user leave, and having a user join. Confirm that these actions still make the thread appear as unread

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable