From 948c811d4b424e5fcf156b1bca3aa403b372c802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 21 Jan 2021 14:01:49 +0100 Subject: [PATCH] client: Simplify the auto key-claiming invocation --- matrix_sdk/src/client.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index d1968b02..5e1b5a0d 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -1743,7 +1743,9 @@ impl Client { #[cfg(feature = "encryption")] { - if let Err(e) = self.claim_one_time_keys(&mut [].iter()).await { + // This is needed because sometimes we need to automatically + // claim some one-time keys to unwedge an exisitng Olm session. + if let Err(e) = self.claim_one_time_keys([].iter()).await { warn!("Error while claiming one-time keys {:?}", e); }