mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
if there is no postData.tid dont notify, ie topic post
This commit is contained in:
@@ -187,6 +187,10 @@ define('composer', dependencies, function(taskbar, controls, uploads, formatting
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!parseInt(postData.tid, 10)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
stopNotifyInterval(postData);
|
stopNotifyInterval(postData);
|
||||||
|
|
||||||
emit();
|
emit();
|
||||||
@@ -194,6 +198,9 @@ define('composer', dependencies, function(taskbar, controls, uploads, formatting
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stopNotifyTyping(postData) {
|
function stopNotifyTyping(postData) {
|
||||||
|
if (!parseInt(postData.tid, 10)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
socket.emit('modules.composer.stopNotifyTyping', {
|
socket.emit('modules.composer.stopNotifyTyping', {
|
||||||
tid: postData.tid,
|
tid: postData.tid,
|
||||||
uid: app.uid
|
uid: app.uid
|
||||||
|
|||||||
@@ -93,14 +93,14 @@ SocketModules.composer.renderHelp = function(socket, data, callback) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
SocketModules.composer.notifyTyping = function(socket, data) {
|
SocketModules.composer.notifyTyping = function(socket, data) {
|
||||||
if (!socket.uid) {
|
if (!socket.uid || !parseInt(data.tid, 10)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
server.in('topic_' + data.tid).emit('event:topic.notifyTyping', data);
|
server.in('topic_' + data.tid).emit('event:topic.notifyTyping', data);
|
||||||
};
|
};
|
||||||
|
|
||||||
SocketModules.composer.stopNotifyTyping = function(socket, data) {
|
SocketModules.composer.stopNotifyTyping = function(socket, data) {
|
||||||
if (!socket.uid) {
|
if (!socket.uid || !parseInt(data.tid, 10)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
server.in('topic_' + data.tid).emit('event:topic.stopNotifyTyping', data);
|
server.in('topic_' + data.tid).emit('event:topic.stopNotifyTyping', data);
|
||||||
|
|||||||
Reference in New Issue
Block a user