don't allow room owner to kick themselves out

v1.18.x
Julian Lam 7 years ago
parent 5dc25a3c00
commit 178d4b2f92

@ -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;
});

Loading…
Cancel
Save