Add more optimized iterations for user memberships room_id's.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-10-04 06:17:43 +00:00
parent ee777bc287
commit 443248965d
3 changed files with 47 additions and 8 deletions

View File

@@ -119,14 +119,14 @@ pub(crate) async fn sync_events_v5_route(
let all_invited_rooms = services
.state_cache
.rooms_invited_state(sender_user)
.map(|r| r.0)
.rooms_invited(sender_user)
.map(ToOwned::to_owned)
.collect::<Vec<OwnedRoomId>>();
let all_knocked_rooms = services
.state_cache
.rooms_knocked_state(sender_user)
.map(|r| r.0)
.rooms_knocked(sender_user)
.map(ToOwned::to_owned)
.collect::<Vec<OwnedRoomId>>();
let (all_joined_rooms, all_invited_rooms, all_knocked_rooms) =