Add option to ban user in profile viewer

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-01-12 18:50:54 +05:30
parent 248fc15716
commit a1d9c21337
2 changed files with 29 additions and 7 deletions

View file

@ -199,6 +199,13 @@ async function kick(roomId, userId, reason) {
return result;
}
async function ban(roomId, userId, reason) {
const mx = initMatrix.matrixClient;
const result = await mx.ban(roomId, userId, reason);
return result;
}
async function setPowerLevel(roomId, userId, powerLevel) {
const mx = initMatrix.matrixClient;
const room = mx.getRoom(roomId);
@ -225,7 +232,7 @@ function deleteSpaceShortcut(roomId) {
export {
join, leave,
create, invite, kick,
create, invite, kick, ban,
setPowerLevel,
createSpaceShortcut, deleteSpaceShortcut,
};