Add option to unban user in profile viewer

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-01-13 10:28:33 +05:30
parent 0e17c57856
commit 090ada5807
2 changed files with 24 additions and 7 deletions

View file

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