return helpful message instead of empty message if no backups

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry authored and June committed 2024-03-23 01:49:27 -04:00
1 parent f9a60bf48b
commit 7af78cf708
1 file changed
+4
+4
View File
@@ -1875,6 +1875,10 @@ impl Service {
ServerCommand::ListBackups => { ServerCommand::ListBackups => {
let result = services().globals.db.backup_list()?; let result = services().globals.db.backup_list()?;
if result.is_empty() {
return Ok(RoomMessageEventContent::text_plain("No backups found."));
}
RoomMessageEventContent::text_plain(result) RoomMessageEventContent::text_plain(result)
}, },
ServerCommand::BackupDatabase => { ServerCommand::BackupDatabase => {