fix spec violation and slight alias resolution refactor

This commit is contained in:
dasha_uwu authored and Jason Volk committed 2025-09-23 05:16:29 +00:00
1 parent 9c4d376bec
commit 1c0b4e94ac
12 files changed
+74 -118

No files matched your search

+10 -2
View File
@@ -25,7 +25,11 @@ pub(crate) enum RoomTimelineCommand {
#[admin_command]
pub(super) async fn last(&self, room_id: OwnedRoomOrAliasId) -> Result {
let room_id = self.services.alias.resolve(&room_id).await?;
let room_id = self
.services
.alias
.maybe_resolve(&room_id)
.await?;
let result = self
.services
@@ -43,7 +47,11 @@ pub(super) async fn pdus(
from: Option<String>,
limit: Option<usize>,
) -> Result {
let room_id = self.services.alias.resolve(&room_id).await?;
let room_id = self
.services
.alias
.maybe_resolve(&room_id)
.await?;
let from: Option<PduCount> = from.as_deref().map(str::parse).transpose()?;
+5 -1
View File
@@ -30,7 +30,11 @@ pub(super) async fn short_event_id(&self, event_id: OwnedEventId) -> Result {
#[admin_command]
pub(super) async fn short_room_id(&self, room_id: OwnedRoomOrAliasId) -> Result {
let room_id = self.services.alias.resolve(&room_id).await?;
let room_id = self
.services
.alias
.maybe_resolve(&room_id)
.await?;
let shortid = self
.services