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:
committed by
Jason Volk
parent
1664a2c225
commit
a91380ac17
@@ -1,7 +1,7 @@
|
|||||||
use clap::Subcommand;
|
use clap::Subcommand;
|
||||||
use futures::StreamExt;
|
use futures::StreamExt;
|
||||||
use ruma::OwnedRoomId;
|
use ruma::OwnedRoomId;
|
||||||
use tuwunel_core::{Err, Result};
|
use tuwunel_core::Result;
|
||||||
|
|
||||||
use crate::{Context, PAGE_SIZE, get_room_info};
|
use crate::{Context, PAGE_SIZE, get_room_info};
|
||||||
|
|
||||||
@@ -57,7 +57,11 @@ pub(super) async fn process(command: RoomDirectoryCommand, context: &Context<'_>
|
|||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
if rooms.is_empty() {
|
if rooms.is_empty() {
|
||||||
return Err!("No more rooms.");
|
context
|
||||||
|
.write_str("No rooms are published.")
|
||||||
|
.await?;
|
||||||
|
|
||||||
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let body = rooms
|
let body = rooms
|
||||||
|
|||||||
Reference in New Issue
Block a user