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 User = Users.findOne({ userId: requesterUserId, meetingId });
|
||||||
|
|
||||||
const chatIdWithCounter = groupChats.map((groupChat) => {
|
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 {
|
return {
|
||||||
chatId: groupChat.chatId,
|
chatId: groupChat.chatId,
|
||||||
count: msgCount,
|
count: msgCount,
|
||||||
};
|
};
|
||||||
}).filter(chat => chat.count);
|
}).filter((chat) => chat.count);
|
||||||
return chatIdWithCounter;
|
return chatIdWithCounter;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user