Skip to content

Commit b060f96

Browse files
committed
feat(crypto): Add RoomSettings::enable_encrypted_state_events (WASM SDK)
1 parent 46f6842 commit b060f96

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

crates/matrix-sdk-crypto/src/store/integration_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ macro_rules! cryptostore_integration_tests {
11631163
let room_1 = room_id!("!test_1:localhost");
11641164
let settings_1 = RoomSettings {
11651165
algorithm: EventEncryptionAlgorithm::MegolmV1AesSha2,
1166+
encrypt_state_events: false,
11661167
only_allow_trusted_devices: true,
11671168
session_rotation_period: Some(Duration::from_secs(10)),
11681169
session_rotation_period_messages: Some(123),

crates/matrix-sdk-crypto/src/store/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,9 @@ pub struct RoomSettings {
411411
/// The encryption algorithm that should be used in the room.
412412
pub algorithm: EventEncryptionAlgorithm,
413413

414+
/// Whether state event encryption is enabled.
415+
pub encrypt_state_events: bool,
416+
414417
/// Should untrusted devices receive the room key, or should they be
415418
/// excluded from the conversation.
416419
pub only_allow_trusted_devices: bool,
@@ -428,6 +431,7 @@ impl Default for RoomSettings {
428431
fn default() -> Self {
429432
Self {
430433
algorithm: EventEncryptionAlgorithm::MegolmV1AesSha2,
434+
encrypt_state_events: false,
431435
only_allow_trusted_devices: false,
432436
session_rotation_period: None,
433437
session_rotation_period_messages: None,

0 commit comments

Comments
 (0)