Add push notifications for chat participants

This commit is contained in:
Adolfo Reyna
2026-02-22 23:31:13 -05:00
parent 93d5b6b5f3
commit fd82643477
3 changed files with 30 additions and 0 deletions

View File

@@ -27,6 +27,13 @@ const chatDB = (DB) => {
};
};
DB.getChatParticipants = async () => {
return DB.chatMessagesCol.distinct("senderProfileId").catch((err) => {
console.log(err);
return [];
});
};
DB.getRecentChatMessages = async (limit = 100) => {
const safeLimit = Math.min(Math.max(parseInt(limit, 10) || 100, 1), 200);
const messages = await DB.chatMessagesCol.find({})