diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-03 16:59:09 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-09-03 17:02:02 +0200 |
commit | ede161d2965fa41789c0ef799f154d7a27f60d1c (patch) | |
tree | 543d29c7ce501116ba2ac1b88fb57fe279573832 /webclient | |
parent | Handle new state events which don't have a common ancestor (diff) | |
download | synapse-ede161d2965fa41789c0ef799f154d7a27f60d1c.tar.xz |
Added /kick $user_id
Diffstat (limited to 'webclient')
-rw-r--r-- | webclient/room/room-controller.js | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index 69305c7fa9..00f585b5e2 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -283,8 +283,18 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) } break; + case "/kick": + // Kick a user from the room + if (2 === args.length) { + var user_id = args[1]; + + // Set his state in the room as leave + promise = matrixService.membershipChange($scope.room_id, user_id, "leave"); + } + break; + case "/ban": - // Ban the user id from the room + // Ban a user from the room if (2 <= args.length) { // TODO: The user may have entered the display name // Need display name -> user_id resolution. Pb: how to manage user with same display names? @@ -299,7 +309,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) break; case "/unban": - // Unban the user id from the room + // Unban a user from the room if (2 === args.length) { var user_id = args[1]; @@ -309,7 +319,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) break; case "/op": - // Define the power level of an user + // Define the power level of a user if (3 === args.length) { var user_id = args[1]; var powerLevel = parseInt(args[2]); @@ -318,7 +328,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) break; case "/deop": - // Reset the power level of an user + // Reset the power level of a user if (2 === args.length) { var user_id = args[1]; promise = matrixService.setUserPowerLevel($scope.room_id, user_id, undefined); |