mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 06:53:32 -04:00
feat(crypto): Implement OlmMachine.trackedUsers.
This commit is contained in:
@@ -52,6 +52,22 @@ impl OlmMachine {
|
||||
future_to_promise(async move { Ok(me.display_name().await?) })
|
||||
}
|
||||
|
||||
/// Get all the tracked users of our own device.
|
||||
#[wasm_bindgen(js_name = "trackedUsers")]
|
||||
pub fn tracked_users(&self) -> Set {
|
||||
let set = Set::new(&JsValue::UNDEFINED);
|
||||
|
||||
self.inner
|
||||
.tracked_users()
|
||||
.into_iter()
|
||||
.map(|user| identifiers::UserId { inner: user })
|
||||
.for_each(|user| {
|
||||
set.add(&user.into());
|
||||
});
|
||||
|
||||
set
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = "receiveSyncChanges")]
|
||||
pub fn receive_sync_changes(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user