mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-10 21:59:58 -04:00
Added /ban command
This commit is contained in:
parent
65c7f78e9f
commit
56427b8057
2 changed files with 29 additions and 1 deletions
|
@ -269,6 +269,22 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput'])
|
|||
promise = matrixService.setDisplayName(args[1]);
|
||||
}
|
||||
break;
|
||||
|
||||
case "/ban":
|
||||
// Ban the user id 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?
|
||||
var user_id = args[1];
|
||||
|
||||
// Does the user provide a reason?
|
||||
if (3 <= args.length) {
|
||||
var reason = args.slice(2).join(' ');
|
||||
}
|
||||
promise = matrixService.ban($scope.room_id, user_id, reason);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue