Fix messages load stuck
This commit is contained in:
parent
2e5c90bb35
commit
3ff065aa5c
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user