Page MenuHomePhabricator

Implement ChangeThreadSubscriptionSpec and add ThreadSubscription to createThickRawThreadInfo
ClosedPublic

Authored by marcin on Aug 21 2024, 9:47 AM.
Tags
None
Referenced Files
F3369915: D13132.id43797.diff
Tue, Nov 26, 12:04 AM
Unknown Object (File)
Fri, Nov 22, 12:50 PM
Unknown Object (File)
Fri, Nov 22, 12:41 PM
Unknown Object (File)
Wed, Nov 20, 12:35 PM
Unknown Object (File)
Sun, Nov 10, 12:13 PM
Unknown Object (File)
Sat, Nov 9, 9:47 PM
Unknown Object (File)
Fri, Nov 8, 10:37 PM
Unknown Object (File)
Fri, Nov 8, 1:44 PM
Subscribers

Details

Summary

This differential implements DMOperation and necessary spec for changing thread subscription. Additionally createThickRawThreadInfo is modified to accept information about subscription. This way users will get to now other members subscriptions when they are added or join the thread.

Test Plan
  1. Apply this patch: https://gist.github.com/marcinwasowicz/e0e48311f76df2acbacd0ac59e888a9c
  2. Send message from one web user to another.
  3. Ensure that both have new thread in redux and the sender has non-default subscription.

Diff Detail

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

Event Timeline

tomek added inline comments.
lib/shared/dm-ops/change-thread-subscription.js
67–73

This is tricky because it is possible we haven't yet received an update about the viewer joining this thread, but the update should be processed later and is valid. We shouldn't throw it away. Added a comment to the relevant issue https://linear.app/comm/issue/ENG-9000/create-validators-and-their-conversion-functions#comment-fc572ece.

For now, I guess we can keep it as is.

lib/shared/dm-ops/create-thread-spec.js
107
lib/types/dm-ops.js
55
This revision is now accepted and ready to land.Aug 28 2024, 6:24 AM
  1. Addres review
  2. Rebase before landing
lib/shared/dm-ops/dm-op-utils.js
176–179 ↗(On Diff #43796)

The fact that I had to do this suggests that ThreadSubscription should be passed from` ThickRawThreadInfo` to ThreadInfo.