mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 12:23:48 +01:00
Added /kick $user_id
This commit is contained in:
parent
b5f9d47c89
commit
ede161d296
1 changed files with 14 additions and 4 deletions
|
@ -283,8 +283,18 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
||||||
}
|
}
|
||||||
break;
|
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":
|
case "/ban":
|
||||||
// Ban the user id from the room
|
// Ban a user from the room
|
||||||
if (2 <= args.length) {
|
if (2 <= args.length) {
|
||||||
// TODO: The user may have entered the display name
|
// TODO: The user may have entered the display name
|
||||||
// Need display name -> user_id resolution. Pb: how to manage user with same display names?
|
// 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;
|
break;
|
||||||
|
|
||||||
case "/unban":
|
case "/unban":
|
||||||
// Unban the user id from the room
|
// Unban a user from the room
|
||||||
if (2 === args.length) {
|
if (2 === args.length) {
|
||||||
var user_id = args[1];
|
var user_id = args[1];
|
||||||
|
|
||||||
|
@ -309,7 +319,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "/op":
|
case "/op":
|
||||||
// Define the power level of an user
|
// Define the power level of a user
|
||||||
if (3 === args.length) {
|
if (3 === args.length) {
|
||||||
var user_id = args[1];
|
var user_id = args[1];
|
||||||
var powerLevel = parseInt(args[2]);
|
var powerLevel = parseInt(args[2]);
|
||||||
|
@ -318,7 +328,7 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "/deop":
|
case "/deop":
|
||||||
// Reset the power level of an user
|
// Reset the power level of a user
|
||||||
if (2 === args.length) {
|
if (2 === args.length) {
|
||||||
var user_id = args[1];
|
var user_id = args[1];
|
||||||
promise = matrixService.setUserPowerLevel($scope.room_id, user_id, undefined);
|
promise = matrixService.setUserPowerLevel($scope.room_id, user_id, undefined);
|
||||||
|
|
Loading…
Reference in a new issue