File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
crates/matrix-sdk/src/room Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1929,13 +1929,28 @@ impl Room {
19291929 )
19301930 . await ;
19311931
1932- // If encryption was enabled, return.
19331932 let _sync_lock = self . client . base_client ( ) . sync_lock ( ) . lock ( ) . await ;
1933+
1934+ // If encryption was enabled, return.
1935+ #[ cfg( not( feature = "experimental-encrypted-state-events" ) ) ]
19341936 if res. is_ok ( ) && self . inner . encryption_state ( ) . is_encrypted ( ) {
19351937 debug ! ( "room successfully marked as encrypted" ) ;
19361938 return Ok ( ( ) ) ;
19371939 }
19381940
1941+ // If encryption with state event encryption was enabled, return.
1942+ #[ cfg( feature = "experimental-encrypted-state-events" ) ]
1943+ if res. is_ok ( ) && {
1944+ if encrypted_state_events {
1945+ self . inner . encryption_state ( ) . is_state_encrypted ( )
1946+ } else {
1947+ self . inner . encryption_state ( ) . is_encrypted ( )
1948+ }
1949+ } {
1950+ debug ! ( "room successfully marked as encrypted" ) ;
1951+ return Ok ( ( ) ) ;
1952+ }
1953+
19391954 // If after waiting for multiple syncs, we don't have the encryption state we
19401955 // expect, assume the local encryption state is incorrect; this will
19411956 // cause the SDK to re-request it later for confirmation, instead of
You can’t perform that action at this time.
0 commit comments