Skip to main content

tuwunel_admin/query/short/
short_room_id.rs

1use ruma::OwnedRoomOrAliasId;
2use tuwunel_core::Result;
3
4use crate::admin_command;
5
6#[admin_command]
7pub(super) async fn short_room_id(&self, room_id: OwnedRoomOrAliasId) -> Result {
8	let room_id = self
9		.services
10		.alias
11		.maybe_resolve(&room_id)
12		.await?;
13
14	let shortid = self
15		.services
16		.short
17		.get_shortroomid(&room_id)
18		.await?;
19
20	write!(self, "{shortid:#?}").await
21}