mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-13 18:50:29 +03:00
Add option to ban user in profile viewer
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
248fc15716
commit
a1d9c21337
2 changed files with 29 additions and 7 deletions
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue