Skip to content

Commit b4a0220

Browse files
committed
fix(sdk): Check correct encryption state for encrypted state events
1 parent 7880ec5 commit b4a0220

File tree

1 file changed

+6
-1
lines changed
  • crates/matrix-sdk/src/room

1 file changed

+6
-1
lines changed

crates/matrix-sdk/src/room/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,12 @@ impl Room {
19311931

19321932
// If encryption was enabled, return.
19331933
let _sync_lock = self.client.base_client().sync_lock().lock().await;
1934-
if res.is_ok() && self.inner.encryption_state().is_encrypted() {
1934+
if res.is_ok()
1935+
&& match encrypted_state_events {
1936+
false => self.inner.encryption_state().is_encrypted(),
1937+
true => self.inner.encryption_state().is_state_encrypted(),
1938+
}
1939+
{
19351940
debug!("room successfully marked as encrypted");
19361941
return Ok(());
19371942
}

0 commit comments

Comments
 (0)