From 270f8130daba7a012ec5310f573a9d2a277a773e Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 18 Dec 2015 13:32:53 +0200 Subject: [PATCH] closes #3952 --- src/socket.io/groups.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/socket.io/groups.js b/src/socket.io/groups.js index 3b12693be0..0361560f01 100644 --- a/src/socket.io/groups.js +++ b/src/socket.io/groups.js @@ -144,6 +144,9 @@ SocketGroups.update = isOwner(function(socket, data, callback) { SocketGroups.kick = isOwner(function(socket, data, callback) { + if (socket.uid === parseInt(data.uid, 10)) { + return callback(new Error('[[error:cant-kick-self]]')); + } groups.leave(data.groupName, data.uid, callback); });