fix missing command response; use non-empty command responses

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-16 19:44:46 +00:00
parent 5aee03d14a
commit 2cb31275f0

View file

@ -18,7 +18,7 @@ pub(crate) async fn uptime(_body: Vec<&str>) -> Result<RoomMessageEventContent>
seconds % 60, seconds % 60,
); );
Ok(RoomMessageEventContent::notice_html(String::new(), result)) Ok(RoomMessageEventContent::notice_plain(result))
} }
pub(crate) async fn show_config(_body: Vec<&str>) -> Result<RoomMessageEventContent> { pub(crate) async fn show_config(_body: Vec<&str>) -> Result<RoomMessageEventContent> {
@ -109,12 +109,12 @@ pub(crate) async fn admin_notice(_body: Vec<&str>, message: Vec<String>) -> Resu
pub(crate) async fn reload(_body: Vec<&str>) -> Result<RoomMessageEventContent> { pub(crate) async fn reload(_body: Vec<&str>) -> Result<RoomMessageEventContent> {
services().server.reload()?; services().server.reload()?;
Ok(RoomMessageEventContent::notice_plain(String::new())) Ok(RoomMessageEventContent::notice_plain("Reloading server..."))
} }
pub(crate) async fn shutdown(_body: Vec<&str>) -> Result<RoomMessageEventContent> { pub(crate) async fn shutdown(_body: Vec<&str>) -> Result<RoomMessageEventContent> {
warn!("shutdown command"); warn!("shutdown command");
services().server.shutdown()?; services().server.shutdown()?;
Ok(RoomMessageEventContent::notice_plain(String::new())) Ok(RoomMessageEventContent::notice_plain("Shutting down server..."))
} }