mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
closes #4275
This commit is contained in:
@@ -62,8 +62,8 @@ SocketModules.chats.newRoom = function(socket, data, callback) {
|
||||
}
|
||||
|
||||
Messaging.canMessageUser(socket.uid, data.touid, function(err, allowed) {
|
||||
if (err || !allowed) {
|
||||
return callback(err || new Error('[[error:chat-restricted]]'));
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
Messaging.newRoom(socket.uid, [data.touid], callback);
|
||||
|
||||
Reference in New Issue
Block a user