From a91380ac17182a21c54e2e482e0619875011bb65 Mon Sep 17 00:00:00 2001 From: ObiomaAtWanagu Date: Fri, 1 Aug 2025 17:32:41 +0200 Subject: [PATCH] Change from the error 'No more rooms.' to the output 'No rooms are published.' if there are no rooms. Signed-off-by: Jason Volk --- src/admin/room/directory.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/admin/room/directory.rs b/src/admin/room/directory.rs index f10619b8..dd2f2aab 100644 --- a/src/admin/room/directory.rs +++ b/src/admin/room/directory.rs @@ -1,7 +1,7 @@ use clap::Subcommand; use futures::StreamExt; use ruma::OwnedRoomId; -use tuwunel_core::{Err, Result}; +use tuwunel_core::Result; use crate::{Context, PAGE_SIZE, get_room_info}; @@ -57,7 +57,11 @@ pub(super) async fn process(command: RoomDirectoryCommand, context: &Context<'_> .collect(); if rooms.is_empty() { - return Err!("No more rooms."); + context + .write_str("No rooms are published.") + .await?; + + return Ok(()); } let body = rooms