Skip to content

Commit a686838

Browse files
committed
test(sdk): Allow the test client to enable shared history
1 parent b3c1ca1 commit a686838

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

crates/matrix-sdk/src/test_utils/client.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,23 @@ impl MockClientBuilder {
6363
self
6464
}
6565

66+
/// Enable the share history on invite feature for the Client.
67+
#[cfg(feature = "e2e-encryption")]
68+
pub fn enable_share_history_on_invite(mut self) -> Self {
69+
self.builder = self.builder.with_enable_share_history_on_invite(true);
70+
self
71+
}
72+
73+
/// Use the given encryption settings with the test client.
74+
#[cfg(feature = "e2e-encryption")]
75+
pub fn with_encryption_settings(
76+
mut self,
77+
settings: crate::encryption::EncryptionSettings,
78+
) -> Self {
79+
self.builder = self.builder.with_encryption_settings(settings);
80+
self
81+
}
82+
6683
/// Set the cached server versions in the client.
6784
pub fn server_versions(mut self, versions: Vec<MatrixVersion>) -> Self {
6885
self.server_versions = ServerVersions::Custom(versions);

0 commit comments

Comments
 (0)