diff --git a/src/buffers/room.rs b/src/buffers/room.rs index a24d2f8..f4017c8 100644 --- a/src/buffers/room.rs +++ b/src/buffers/room.rs @@ -288,7 +288,14 @@ impl RoomBuffer { #[async_trait] impl Buffer for RoomBuffer { fn short_name(&self) -> String { - self.room_id.as_str().to_owned() + self + .buffers + .iter() + .flat_map(|buf| buf.client.get_room(&self.room_id)) + .flat_map(|room| room.canonical_alias()) // TODO: .display_name() is better, but async :( + .map(|alias| alias.as_str().to_owned()) + .next() + .unwrap_or(self.room_id.as_str().to_owned()) } fn room_id(&self) -> Option<&RoomId> {