From 699b74603bbea3f88e99d3dffbbbae8f5ebfa429 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 25 Oct 2014 19:22:13 -0400 Subject: [PATCH] only for logged in users --- src/socket.io/modules.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/socket.io/modules.js b/src/socket.io/modules.js index 702a40f8ed..d8ced59f1f 100644 --- a/src/socket.io/modules.js +++ b/src/socket.io/modules.js @@ -93,10 +93,16 @@ SocketModules.composer.renderHelp = function(socket, data, callback) { }; SocketModules.composer.notifyTyping = function(socket, data) { + if (!socket.uid) { + return; + } server.in('topic_' + data.tid).emit('event:topic.notifyTyping', data); }; SocketModules.composer.stopNotifyTyping = function(socket, data) { + if (!socket.uid) { + return; + } server.in('topic_' + data.tid).emit('event:topic.stopNotifyTyping', data); };