mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 02:24:54 +08:00

This commit follows up b6c5a2da08c08b4df45c0885ec2757a117d83dea by serializing the user's thread memberships in these cases: 1. When we do the initial channel fetch with messages, we get all threads and all the user's thread memberships for those messages. 2. When the thread list is fetched, we get all the user's memberships in that list. 3. When the single thread is fetched, either from opening it from the list, an OM indicator, or just from doing .find() on the manager when a new MessageBus message comes in This will let us track the lastReadMessageId on the client, and will also let us fix an issue where the unread indicator in the channel header was incrementing for every thread that got a new message, regardless of whether the user was a member.