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 {
1929
1929
)
1930
1930
. await ;
1931
1931
1932
- // If encryption was enabled, return.
1933
1932
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" ) ) ]
1934
1936
if res. is_ok ( ) && self . inner . encryption_state ( ) . is_encrypted ( ) {
1935
1937
debug ! ( "room successfully marked as encrypted" ) ;
1936
1938
return Ok ( ( ) ) ;
1937
1939
}
1938
1940
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
+
1939
1954
// If after waiting for multiple syncs, we don't have the encryption state we
1940
1955
// expect, assume the local encryption state is incorrect; this will
1941
1956
// cause the SDK to re-request it later for confirmation, instead of
You can’t perform that action at this time.
0 commit comments