Add support for banning/unbanning group members

This commit is contained in:
AsamK 2022-04-09 19:01:37 +02:00
parent 69f1d0c213
commit 2a20e70aab
17 changed files with 246 additions and 16 deletions

View file

@ -268,6 +268,12 @@ pub enum CliCommands {
#[clap(long = "remove-admin")]
remove_admin: Vec<String>,
#[clap(long)]
ban: Vec<String>,
#[clap(long)]
unban: Vec<String>,
#[clap(long = "reset-link")]
reset_link: bool,

View file

@ -227,6 +227,8 @@ pub trait Rpc {
#[allow(non_snake_case)] removeMember: Vec<String>,
admin: Vec<String>,
#[allow(non_snake_case)] removeAdmin: Vec<String>,
ban: Vec<String>,
unban: Vec<String>,
#[allow(non_snake_case)] resetLink: bool,
#[allow(non_snake_case)] link: Option<String>,
#[allow(non_snake_case)] setPermissionAddMember: Option<String>,

View file

@ -243,6 +243,8 @@ async fn main() -> Result<(), anyhow::Error> {
remove_member,
admin,
remove_admin,
ban,
unban,
reset_link,
link,
set_permission_add_member,
@ -261,6 +263,8 @@ async fn main() -> Result<(), anyhow::Error> {
remove_member,
admin,
remove_admin,
ban,
unban,
reset_link,
link.map(|link| match link {
LinkState::Enabled => "enabled".to_owned(),