Page MenuHomePhabricator

Implement updating DM thread subscription
ClosedPublic

Authored by marcin on Sep 4 2024, 2:59 AM.
Tags
None
Referenced Files
F3349866: D13236.id43943.diff
Fri, Nov 22, 7:31 PM
F3348517: D13236.diff
Fri, Nov 22, 3:01 PM
Unknown Object (File)
Wed, Nov 20, 11:44 AM
Unknown Object (File)
Sat, Nov 9, 3:49 PM
Unknown Object (File)
Sat, Nov 9, 3:02 PM
Unknown Object (File)
Sat, Nov 9, 8:11 AM
Unknown Object (File)
Sat, Nov 9, 7:58 AM
Unknown Object (File)
Sat, Nov 9, 7:52 AM
Subscribers

Details

Summary

This differential implements synchronizing thread subscription in dm threads.

Test Plan
  1. Create dm thread and add another user. (Use UI button implemented by Kamil)
  2. Play around with changing thread subscription and sending notifs.

Diff Detail

Repository
rCOMM Comm
Branch
marcin/eng-8522
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

marcin requested review of this revision.Sep 4 2024, 3:16 AM
tomek requested changes to this revision.Sep 6 2024, 8:19 AM
tomek added inline comments.
lib/shared/dm-ops/change-thread-subscription.js
38–46

We need to introduce a new timestamp that should be used to check whether the subscription should be updated.

lib/shared/thread-settings-notifications-utils.js
6–7

Can be merged

178–180

We should use dispatchActionPromise so that the status can be tracked.

This revision now requires changes to proceed.Sep 6 2024, 8:19 AM
  1. Address review
  2. Refactor to execute DM logic in hook instead of component to match latest convention
tomek added inline comments.
lib/shared/dm-ops/change-thread-subscription.js
38–46

Discussed it offline. We don't need to introduce a new timestamp, because we already have one in members[viewerID]. We don't want to duplicate it because then it will become possible to break the consistency.

lib/shared/thread-settings-notifications-utils.js
178–180

Should we use the dispatchActionPromise?

This revision is now accepted and ready to land.Sep 9 2024, 1:52 AM
lib/shared/thread-settings-notifications-utils.js
178–180

This question refers to the old version of this diff. Latest version doesn't have this issue anymore.

This revision was landed with ongoing or failed builds.Sep 9 2024, 2:53 AM
This revision was automatically updated to reflect the committed changes.

I have the same concerns here that I highlighted in D13260. @marcin, can you address them as part of the same stack as D13260, and land the fixes together?