mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 13:49:52 -07:00
Add command for setting room history visibility (#328)
This commit is contained in:
parent
df3896df9c
commit
3003f0a528
3 changed files with 48 additions and 0 deletions
|
@ -423,6 +423,18 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
|
|||
RoomAction::MemberUpdate(MemberUpdateAction::Unban, u.into(), r, desc.bang).into()
|
||||
},
|
||||
|
||||
// :room history set <visibility>
|
||||
("history", "set", Some(s)) => RoomAction::Set(RoomField::History, s).into(),
|
||||
("history", "set", None) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room history unset
|
||||
("history", "unset", None) => RoomAction::Unset(RoomField::History).into(),
|
||||
("history", "unset", Some(_)) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room history show
|
||||
("history", "show", None) => RoomAction::Show(RoomField::History).into(),
|
||||
("history", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
||||
// :room name set <room-name>
|
||||
("name", "set", Some(s)) => RoomAction::Set(RoomField::Name, s).into(),
|
||||
("name", "set", None) => return Result::Err(CommandError::InvalidArgument),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue