Create the spec.
https://linear.app/comm/issue/ENG-8737/create-dmoperations-for-changesettingsmessageinfo
Depends on D12872
Differential D12881
[lib] DMOperationSpec for change thread settings operation tomek on Jul 25 2024, 8:47 AM. Authored by Tags None Referenced Files
Subscribers
Details Create the spec. https://linear.app/comm/issue/ENG-8737/create-dmoperations-for-changesettingsmessageinfo Depends on D12872 Tested that processing the operation with changed name and color results with these values being updated both in Redux and in the DB (on web).
Diff Detail
Event Timeline
Comment Actions Extract common logic
Comment Actions Should we set the unread status?
Comment Actions Yes, you're right!
Comment Actions I wonder if it would be better to handle this as a "side effect" of the main processDMOperation. We could take a similar approach to updating the replies count. We would need to check all of the rawMessageInfos, as well as any messages in the updateInfos, to see if any new messages are introduced that aren't from the viewer. This could potentially be done in useProcessDMOperation. Potentially mergeUpdatesWithMessageInfos could be helpful for extracting the messages from the updates. @tomek, what do you think? A unified approach would mitigate the risk of the programmer forgetting to handle it in a specific case, and it would reduce code duplication. Comment Actions Makes sense! Created a task to track https://linear.app/comm/issue/ENG-8930/unify-the-approach-to-replies-count-and-unread-status-updates, because creating a new diff on top of this stack is more efficient than updating all the diffs. |