Skip to content

Node.js based forum software built for the modern web

chat typing notif use room

barisusakli05a9e8b1d627
diff --git a/src/socket.io/modules.js b/src/socket.io/modules.js
index de9936db6e..12878f7d17 100644
--- a/src/socket.io/modules.js
+++ b/src/socket.io/modules.js
@@ -266,9 +266,7 @@ function sendTypingNotification(event, socket, data, callback) {
if (!socket.uid || !data) {
return;
}
- server.getUserSockets(data.touid).forEach(function(socket) {
- socket.emit(event, data.fromUid);
- });
+ server.in('uid_' + data.touid).emit(event, data.fromUid);
}
SocketModules.chats.list = function(socket, data, callback) {