Improve perfomance of build_room_key_bundle

This commit is contained in:
multi prise
2025-09-03 13:26:10 +02:00
committed by Damir Jelić
parent 7767ef6ca3
commit bcabf1bda4
+1 -4
View File
@@ -1580,10 +1580,7 @@ impl Store {
&self,
room_id: &RoomId,
) -> std::result::Result<RoomKeyBundle, CryptoStoreError> {
// TODO: make this WAY more efficient. We should only fetch sessions for the
// correct room.
let mut sessions = self.get_inbound_group_sessions().await?;
sessions.retain(|session| session.room_id == room_id);
let sessions = self.get_inbound_group_sessions_by_room_id(room_id).await?;
let mut bundle = RoomKeyBundle::default();
for session in sessions {