[lib] Handle a case where viewer is added to a thread while being its member
Summary:
It is possible that we receive an operation about viewer being added to a thread while the thread is already present in the store and viewer is its member. We need to make sure that we don't override the whole thread and instead update it as little as possible.
Depends on D13483
Test Plan: Create a sidebar, add, remove, and add a user and check on that user's device if the thread is displayed and updated correctly.
Reviewers: kamil, will, ashoat
Reviewed By: ashoat
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D13490