Skip to content
Snippets Groups Projects
Unverified Commit 44cc5ab1 authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #12174 from Tainan404/issue-12094

Fix messages load stuck
parents e00b7efb 3ff065aa
No related branches found
No related tags found
No related merge requests found
......@@ -24,11 +24,15 @@ export default function chatMessageBeforeJoinCounter() {
const User = Users.findOne({ userId: requesterUserId, meetingId });
const chatIdWithCounter = groupChats.map((groupChat) => {
const msgCount = GroupChatMsg.find({ chatId: groupChat.chatId, timestamp: { $lt: User.authTokenValidatedTime } }).count();
const msgCount = GroupChatMsg.find({
meetingId,
chatId: groupChat.chatId,
timestamp: { $lt: User.authTokenValidatedTime },
}).count();
return {
chatId: groupChat.chatId,
count: msgCount,
};
}).filter(chat => chat.count);
}).filter((chat) => chat.count);
return chatIdWithCounter;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment