From f626f2b24e8b8a7877bc4587433ff8b1650caff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 18 Aug 2020 15:22:30 +0200 Subject: [PATCH] crypto: Add some logging for the user identity update logic. --- matrix_sdk_crypto/src/machine.rs | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/matrix_sdk_crypto/src/machine.rs b/matrix_sdk_crypto/src/machine.rs index 3fb2e912..18ad8a5d 100644 --- a/matrix_sdk_crypto/src/machine.rs +++ b/matrix_sdk_crypto/src/machine.rs @@ -511,6 +511,10 @@ impl OlmMachine { let self_signing = if let Some(s) = response.self_signing_keys.get(user_id) { SelfSigningPubkey::from(s) } else { + warn!( + "User identity for user {} didn't contain a self signing pubkey", + user_id + ); continue; }; @@ -521,6 +525,7 @@ impl OlmMachine { { UserSigningPubkey::from(s) } else { + warn!("User identity for our own user {} didn't contain a user signing pubkey", user_id); continue; }; @@ -538,6 +543,10 @@ impl OlmMachine { OwnUserIdentity::new(master_key, self_signing, user_signing) .map(UserIdentities::Own) } else { + warn!( + "User identity for our own user {} didn't contain a user signing pubkey", + user_id + ); continue; } } else { @@ -545,9 +554,19 @@ impl OlmMachine { }; match identity { - Ok(i) => changed.push(i), - Err(_e) => { - // TODO log some error here + Ok(i) => { + trace!( + "Updated or created new user identity for {}: {:?}", + user_id, + i + ); + changed.push(i); + } + Err(e) => { + warn!( + "Coulnd't update or create new user identity for {}: {:?}", + user_id, e + ); continue; } }