matrix-sdk: Send out to-device events in the sync_forever() loop.
parent
d9fbc18777
commit
30c07b4e08
|
@ -1254,8 +1254,6 @@ impl Client {
|
|||
}
|
||||
};
|
||||
|
||||
// TODO send out to-device messages here
|
||||
|
||||
#[cfg(feature = "encryption")]
|
||||
{
|
||||
if self.base_client.should_upload_keys().await {
|
||||
|
@ -1273,6 +1271,16 @@ impl Client {
|
|||
warn!("Error while querying device keys {:?}", e);
|
||||
}
|
||||
}
|
||||
|
||||
for request in self.base_client.outgoing_to_device_requests().await {
|
||||
let transaction_id = request.txn_id.clone();
|
||||
|
||||
if let Ok(_) = self.send(request).await {
|
||||
self.base_client
|
||||
.mark_to_device_request_as_sent(&transaction_id)
|
||||
.await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
callback(response).await;
|
||||
|
|
Loading…
Reference in New Issue