mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
use includes instead of indexOf
use _.uniq instead of filter&indexOf
This commit is contained in:
@@ -318,7 +318,7 @@ SocketModules.chats.markRead = function (socket, roomId, callback) {
|
||||
Messaging.pushUnreadCount(socket.uid);
|
||||
server.in('uid_' + socket.uid).emit('event:chats.markedAsRead', { roomId: roomId });
|
||||
|
||||
if (results.uidsInRoom.indexOf(socket.uid.toString()) === -1) {
|
||||
if (!results.uidsInRoom.includes(String(socket.uid))) {
|
||||
return callback();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user