Skip to content

Commit

Permalink
fix:socket fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rithick574 committed Jul 10, 2024
1 parent b244963 commit df18341
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const findChatByUserId = async (userId: string): Promise<ChatEntity[] | f
const chats = await Chat.find({
participants: { $in: [new Types.ObjectId(userId)] },
type: "individual",
}).populate("participants").sort({ createdAt: -1 });
}).populate("participants").sort({ updatedAt: -1 });

if (!chats || chats.length === 0) {
return false;
Expand Down

0 comments on commit df18341

Please sign in to comment.