mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
chat fixes
update bootstrap tags input dont allow adding self to chat room
This commit is contained in:
@@ -142,6 +142,9 @@ SocketModules.chats.addUserToRoom = function(socket, data, callback) {
|
||||
if (!uid) {
|
||||
return next(new Error('[[error:no-user]]'));
|
||||
}
|
||||
if (socket.uid === parseInt(uid, 10)) {
|
||||
return next(new Error('[[error:cant-add-self-to-chat-room]]'));
|
||||
}
|
||||
Messaging.addUsersToRoom(socket.uid, [uid], data.roomId, next);
|
||||
}
|
||||
], callback);
|
||||
|
||||
Reference in New Issue
Block a user