Page MenuHomePhabricator

[lib] fix `PushHandler` to support DMs
ClosedPublic

Authored by tomek on Oct 2 2024, 8:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 4, 1:39 AM
Unknown Object (File)
Sat, Nov 2, 6:32 PM
Unknown Object (File)
Sat, Nov 2, 6:31 PM
Unknown Object (File)
Sat, Nov 2, 6:27 PM
Unknown Object (File)
Thu, Oct 31, 5:02 AM
Unknown Object (File)
Wed, Oct 30, 1:12 PM
Unknown Object (File)
Tue, Oct 29, 3:15 PM
Unknown Object (File)
Mon, Oct 28, 10:55 AM
Subscribers
None

Details

Summary

Solution described in ENG-9465.

Test Plan

Apply this diff:

  1. Comment this line to make sure we're testing actual notifs code & add some logs to make sure code in reducer was executed.
  2. Open physical device
  3. In DM thread send a test message
  4. Notif delivered
  5. Message immediately visible in UI
  6. Thread marked as unread
  7. Logs from reducer are there

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Oct 2 2024, 8:59 AM
tomek added inline comments.
lib/reducers/thread-reducer.js
338

When threadInfo.currentUser.unread we should bump the timestamp.

341–342

Might be a good idea to reference in getThreadUpdatesForNewMessages this place.

This revision is now accepted and ready to land.Oct 2 2024, 9:06 AM
lib/reducers/thread-reducer.js
341–342

I'm confused why we'd want to set the thread to unread even if the timestamp is newer than the message timestamp

What's the benefit of this? Doesn't it introduce a risk of setting something to unread incorrectly if a notif for message X is received after a Tunnelbroker message is received for message X?

Preemptively accepting so that after @tomek commandeers, it's not in an In Review state

tomek edited reviewers, added: kamil; removed: tomek.

Check the timestamp before updating the status

Performed Kamil's test again (except the logs stuff) and the solution works correctly.

This revision was automatically updated to reflect the committed changes.