mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-18 03:31:03 +01:00
refactor(socket.io): deprecate SocketModules.chat.getUnreadCount in favour of api.chats.getUnread
This commit is contained in:
@@ -79,6 +79,11 @@ chatsAPI.create = async function (caller, data) {
|
||||
return await messaging.getRoomData(roomId);
|
||||
};
|
||||
|
||||
chatsAPI.getUnread = async (caller) => {
|
||||
const count = await messaging.getUnreadCount(caller.uid);
|
||||
return { count };
|
||||
};
|
||||
|
||||
chatsAPI.get = async (caller, { uid, roomId }) => await messaging.loadRoom(caller.uid, { uid, roomId });
|
||||
|
||||
chatsAPI.post = async (caller, data) => {
|
||||
|
||||
Reference in New Issue
Block a user