mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
closes #1990
This commit is contained in:
@@ -117,10 +117,14 @@ SocketModules.chats.get = function(socket, data, callback) {
|
||||
};
|
||||
|
||||
SocketModules.chats.send = function(socket, data, callback) {
|
||||
if(!data) {
|
||||
if (!data) {
|
||||
return callback(new Error('[[error:invalid-data]]'));
|
||||
}
|
||||
|
||||
if (parseInt(meta.config.disableChat) === 1) {
|
||||
return callback(new Error('[[error:chat-disabled]]'));
|
||||
}
|
||||
|
||||
var touid = parseInt(data.touid, 10);
|
||||
if (touid === socket.uid || socket.uid === 0) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user