From 7ca7a31a5a747349ef9e9c26f7eab76165000b7d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 8 Mar 2016 16:12:07 +0200 Subject: [PATCH] only send user status on first connect --- src/socket.io/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index a67ca29869..d6744f7d9b 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -59,6 +59,9 @@ function onConnect(socket) { socket.join('uid_' + socket.uid); socket.join('online_users'); + if (Sockets.getUserSocketCount(socket.uid) > 1) { + return; + } user.getUserFields(socket.uid, ['status'], function(err, userData) { if (err || !userData) { return;