Support :room topic show (#380)

This commit is contained in:
daef 2025-05-14 19:05:28 -07:00 committed by Ulyssa
parent 382a72a468
commit 1dcd658928
No known key found for this signature in database
GPG key ID: F2873CA2997B83C5

View file

@ -475,6 +475,10 @@ fn iamb_room(desc: CommandDescription, ctx: &mut ProgContext) -> ProgResult {
("topic", "unset", None) => RoomAction::Unset(RoomField::Topic).into(), ("topic", "unset", None) => RoomAction::Unset(RoomField::Topic).into(),
("topic", "unset", Some(_)) => return Result::Err(CommandError::InvalidArgument), ("topic", "unset", Some(_)) => return Result::Err(CommandError::InvalidArgument),
// :room topic show
("topic", "show", None) => RoomAction::Show(RoomField::Topic).into(),
("topic", "show", Some(_)) => return Result::Err(CommandError::InvalidArgument),
// :room tag set <tag-name> // :room tag set <tag-name>
("tag", "set", Some(s)) => RoomAction::Set(RoomField::Tag(tag_name(s)?), "".into()).into(), ("tag", "set", Some(s)) => RoomAction::Set(RoomField::Tag(tag_name(s)?), "".into()).into(),
("tag", "set", None) => return Result::Err(CommandError::InvalidArgument), ("tag", "set", None) => return Result::Err(CommandError::InvalidArgument),