Add push notifications for chat participants
This commit is contained in:
@@ -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({})
|
||||
|
||||
Reference in New Issue
Block a user