mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
don't allow room owner to kick themselves out
This commit is contained in:
@@ -202,7 +202,7 @@ SocketModules.chats.getUsersInRoom = function (socket, data, callback) {
|
||||
}
|
||||
|
||||
payload.users = payload.users.map((user) => {
|
||||
user.canKick = payload.isOwner;
|
||||
user.canKick = (parseInt(user.uid, 10) !== parseInt(socket.uid, 10)) && payload.isOwner;
|
||||
return user;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user