Change from the error 'No more rooms.' to the output 'No rooms are published.' if there are no rooms.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
ObiomaAtWanagu
2025-08-01 17:32:41 +02:00
committed by Jason Volk
parent 1664a2c225
commit a91380ac17

View File

@@ -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