fix unsafe precondition violation

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2025-02-21 17:47:44 +00:00 committed by strawberry
parent c614d5bf44
commit 01155fa649

View file

@ -76,11 +76,13 @@ async fn share_encrypted_room(
.state_cache
.get_shared_rooms(sender_user, user_id)
.ready_filter(|&room_id| Some(room_id) != ignore_room)
.broad_any(|other_room_id| {
.map(ToOwned::to_owned)
.broad_any(|other_room_id| async move {
services
.rooms
.state_accessor
.is_encrypted_room(other_room_id)
.is_encrypted_room(&other_room_id)
.await
})
.await
}