From d9344140a0ab3ca88171b9c8f926b0680181d292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 2 Mar 2026 16:58:43 -0500 Subject: [PATCH] refactor: use set --- src/socket.io/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index fdcf6146b0..351b0d145e 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -318,16 +318,16 @@ Sockets.getUidsInRoom = async function (room) { return []; } const ioRoom = Sockets.server.in(room); - const uids = []; + const uids = new Set(); if (ioRoom) { const sockets = await ioRoom.fetchSockets(); for (const s of sockets) { if (s && s.data && s.data.uid > 0) { - uids.push(s.data.uid); + uids.add(s.data.uid); } } } - return _.uniq(uids); + return [...uids]; }; Sockets.warnDeprecated = (socket, replacement) => {