Count unseen messages in group chat with firestore
问题 I want to track the number of unseen messages for each member of a group chat. I store chat metadata in a chats collection, and messages for each chat in messages/{chatId} . I have checked other threads that ask about this, but in this scenario there's a group chat so it's more complicated. The threads that I have read suppose that it's a chat between two people. I have thought about having a new collection seenMsgTimestamps where I store the timestamp of the last message that a certain user