diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 8ab837cd2ad..be115093f66 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -98,6 +98,7 @@ jobs: env: CARGO_PROFILE_COV_INHERITS: 'dev' CARGO_PROFILE_COV_DEBUG: 1 + CARGO_PROFILE_COV_OPT_LEVEL: 1 HOMESERVER_URL: "http://localhost:8008" HOMESERVER_DOMAIN: "synapse" SLIDING_SYNC_PROXY_URL: "http://localhost:8118" diff --git a/crates/matrix-sdk-base/src/client.rs b/crates/matrix-sdk-base/src/client.rs index e39587455ab..c4d6741cec9 100644 --- a/crates/matrix-sdk-base/src/client.rs +++ b/crates/matrix-sdk-base/src/client.rs @@ -1371,10 +1371,12 @@ impl BaseClient { pub async fn share_room_key(&self, room_id: &RoomId) -> Result>> { match self.olm_machine().await.as_ref() { Some(o) => { - let (history_visibility, settings) = self - .get_room(room_id) + let room = self.get_room(room_id); + tracing::warn!("BNJBVR: room found? {:?}", room.is_some()); + let (history_visibility, settings) = room .map(|r| (r.history_visibility(), r.encryption_settings())) .unwrap_or((HistoryVisibility::Joined, None)); + tracing::warn!("BNJBVR: encryption settings: {settings:?}"); // Don't share the group session with members that are invited // if the history visibility is set to `Joined` diff --git a/crates/matrix-sdk-base/src/rooms/normal.rs b/crates/matrix-sdk-base/src/rooms/normal.rs index 9f790ba33f4..75572b59c17 100644 --- a/crates/matrix-sdk-base/src/rooms/normal.rs +++ b/crates/matrix-sdk-base/src/rooms/normal.rs @@ -1238,6 +1238,7 @@ impl RoomInfo { /// Set the encryption event content in this room. pub fn set_encryption_event(&mut self, event: Option) { + tracing::warn!("BNJBVR: set_encryption_event: {event:?}"); self.base_info.encryption = event; } diff --git a/crates/matrix-sdk-base/src/store/mod.rs b/crates/matrix-sdk-base/src/store/mod.rs index 471a17c6717..a41e1dd032d 100644 --- a/crates/matrix-sdk-base/src/store/mod.rs +++ b/crates/matrix-sdk-base/src/store/mod.rs @@ -227,6 +227,7 @@ impl Store { ); let new_room_id = new_room.room_id().to_owned(); + tracing::warn!(room_id = %new_room_id, "BNJBVR: restoring room"); rooms.insert(new_room_id, new_room); } } @@ -294,6 +295,7 @@ impl Store { .write() .unwrap() .get_or_create(room_id, || { + tracing::warn!(%room_id, "BNJBVR: creating a new room in store"); Room::new( user_id, self.inner.clone(), @@ -312,6 +314,7 @@ impl Store { /// * `room_id` - The id of the room that should be forgotten. pub(crate) async fn forget_room(&self, room_id: &RoomId) -> Result<()> { self.inner.remove_room(room_id).await?; + tracing::warn!(%room_id, "BNJBVR: removing room"); self.rooms.write().unwrap().remove(room_id); Ok(()) } diff --git a/crates/matrix-sdk/src/room/mod.rs b/crates/matrix-sdk/src/room/mod.rs index cdcc8bfad93..b50bfb1ed3a 100644 --- a/crates/matrix-sdk/src/room/mod.rs +++ b/crates/matrix-sdk/src/room/mod.rs @@ -564,6 +564,7 @@ impl Room { // Persist the event and the fact that we requested it from the server in // `RoomInfo`. + tracing::warn!("BNJBVR: done request_encryption_state: {response:?}"); let mut room_info = self.clone_info(); room_info.mark_encryption_state_synced(); room_info.set_encryption_event(response.clone());