if there is no postData.tid dont notify, ie topic post

This commit is contained in:
barisusakli
2014-10-29 00:10:57 -04:00
parent cbedc762fd
commit 1b268c94c0
2 changed files with 9 additions and 2 deletions

View File

@@ -93,14 +93,14 @@ SocketModules.composer.renderHelp = function(socket, data, callback) {
};
SocketModules.composer.notifyTyping = function(socket, data) {
if (!socket.uid) {
if (!socket.uid || !parseInt(data.tid, 10)) {
return;
}
server.in('topic_' + data.tid).emit('event:topic.notifyTyping', data);
};
SocketModules.composer.stopNotifyTyping = function(socket, data) {
if (!socket.uid) {
if (!socket.uid || !parseInt(data.tid, 10)) {
return;
}
server.in('topic_' + data.tid).emit('event:topic.stopNotifyTyping', data);