Skip to content

Commit 1b4bd26

Browse files
committed
change(ffi): add timeline configuration option for reporting UTDs
1 parent 055e790 commit 1b4bd26

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bindings/matrix-sdk-ffi/src/room.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,10 @@ impl Room {
237237
builder = builder.with_internal_id_prefix(internal_id_prefix);
238238
}
239239

240-
if let Some(utd_hook) = self.utd_hook.clone() {
241-
builder = builder.with_unable_to_decrypt_hook(utd_hook);
240+
if configuration.report_utds {
241+
if let Some(utd_hook) = self.utd_hook.clone() {
242+
builder = builder.with_unable_to_decrypt_hook(utd_hook);
243+
}
242244
}
243245

244246
let timeline = builder.build().await?;

bindings/matrix-sdk-ffi/src/timeline/configuration.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,8 @@ pub struct TimelineConfiguration {
157157
/// As this has a non negligible performance impact, make sure to enable it
158158
/// only when you need it.
159159
pub track_read_receipts: bool,
160+
161+
/// Whether this timeline instance should report UTDs through the client's
162+
/// delegate.
163+
pub report_utds: bool,
160164
}

0 commit comments

Comments
 (0)