dedupe some state accessors in various places

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-07-03 12:53:51 -04:00
parent b0eec60724
commit 0832c28a40
4 changed files with 30 additions and 74 deletions

View file

@ -106,7 +106,8 @@ pub(crate) async fn get_room_summary(
canonical_alias: services()
.rooms
.state_accessor
.get_canonical_alias(&room_id)?,
.get_canonical_alias(&room_id)
.unwrap_or(None),
avatar_url: services()
.rooms
.state_accessor