Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# UNRELEASED

**Other changes**

- Add `OlmMachine.markAllTrackedUsersAsDirty` to invalidate the device lists
for all known users. This is required for [MSC4186](https://github.com/matrix-org/matrix-spec-proposals/pull/4186)
clients as the server may give up trying to persist device list updates for
the client at some point, after which the client must treat all devices as dirty.

# matrix-sdk-crypto-wasm v8.0.0

**BREAKING CHANGES**
Expand Down
68 changes: 13 additions & 55 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,20 @@ impl OlmMachine {
future_to_promise(async move { Ok(me.display_name().await?) })
}

/// Mark all tracked users as dirty.
///
/// All users *whose device lists we are tracking* are flagged as needing a
/// key query. Users whose devices we are not tracking are ignored.
#[wasm_bindgen(js_name = "markAllTrackedUsersAsDirty")]
pub fn mark_all_tracked_users_as_dirty(&self) -> Promise {
let machine = self.inner.clone();

future_to_promise(async move {
machine.mark_all_tracked_users_as_dirty().await?;
Ok(JsValue::UNDEFINED)
})
}

/// Whether automatic transmission of room key requests is enabled.
///
/// Room key requests allow the device to request room keys that it might
Expand Down
Loading