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); };