@@ -161,7 +161,10 @@ impl OlmMachine {
161
161
future_to_promise ( async move { Ok ( me. display_name ( ) . await ?) } )
162
162
}
163
163
164
- /// Get all the tracked users of our own device.
164
+ /// Get the list of users whose devices we are currently tracking.
165
+ ///
166
+ /// A user can be marked for tracking using the
167
+ /// [`update_tracked_users`](#method.update_tracked_users) method.
165
168
///
166
169
/// Returns a `Set<UserId>`.
167
170
#[ wasm_bindgen( js_name = "trackedUsers" ) ]
@@ -175,16 +178,23 @@ impl OlmMachine {
175
178
set
176
179
}
177
180
178
- /// Update the tracked users.
181
+ /// Update the list of tracked users.
182
+ ///
183
+ /// The OlmMachine maintains a list of users whose devices we are keeping
184
+ /// track of: these are known as "tracked users". These must be users
185
+ /// that we share a room with, so that the server sends us updates for
186
+ /// their device lists.
187
+ ///
188
+ /// # Arguments
179
189
///
180
- /// `users` is an iterator over user IDs that should be marked for
181
- /// tracking.
190
+ /// * `users` - An array of user ids that should be added to the list of
191
+ /// tracked users
182
192
///
183
- /// This will mark users that weren't seen before for a key query
184
- /// and tracking.
193
+ /// Any users that hadn't been seen before will be flagged for a key query
194
+ /// immediately, and whenever `receive_sync_changes` receives a
195
+ /// "changed" notification for that user in the future.
185
196
///
186
- /// If the user is already known to the Olm machine, it will not
187
- /// be considered for a key query.
197
+ /// Users that were already in the list are unaffected.
188
198
#[ wasm_bindgen( js_name = "updateTrackedUsers" ) ]
189
199
pub fn update_tracked_users ( & self , users : & Array ) -> Result < Promise , JsError > {
190
200
let users = users
0 commit comments