add make user admin command (#136)

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-09 06:41:29 +00:00
parent 50c2d2b801
commit 01b2928d55
2 changed files with 23 additions and 0 deletions

View file

@ -71,6 +71,11 @@ pub(super) enum UserCommand {
room_id: OwnedRoomOrAliasId,
},
/// - Grant server-admin privileges to a user.
MakeUserAdmin {
user_id: String,
},
/// - Puts a room tag for the specified user and room ID.
///
/// This is primarily useful if you'd like to set your admin room
@ -123,6 +128,9 @@ pub(super) async fn process(command: UserCommand, body: Vec<&str>) -> Result<Roo
user_id,
room_id,
} => force_join_room(body, user_id, room_id).await?,
UserCommand::MakeUserAdmin {
user_id,
} => make_user_admin(body, user_id).await?,
UserCommand::PutRoomTag {
user_id,
room_id,