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.
Details
- Apply this patch: https://gist.github.com/marcinwasowicz/e0e48311f76df2acbacd0ac59e888a9c
- Send message from one web user to another.
- 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
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 |
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. |
Note that we use RFC 3339 string for ItemID while the ATTR_TIMESTAMP uses milliseconds number. Generally I use the former everywhere (simpler parsing without NaiveDateTime conversions) but I thought the latter is easier for DDB to sort by (it's used only as index sorting key and not read anywhere else)