crypto: Add some logging for the user identity update logic.

master
Damir Jelić 2020-08-18 15:22:30 +02:00
parent 37a7f69e03
commit f626f2b24e
1 changed files with 22 additions and 3 deletions

View File

@ -511,6 +511,10 @@ impl OlmMachine {
let self_signing = if let Some(s) = response.self_signing_keys.get(user_id) { let self_signing = if let Some(s) = response.self_signing_keys.get(user_id) {
SelfSigningPubkey::from(s) SelfSigningPubkey::from(s)
} else { } else {
warn!(
"User identity for user {} didn't contain a self signing pubkey",
user_id
);
continue; continue;
}; };
@ -521,6 +525,7 @@ impl OlmMachine {
{ {
UserSigningPubkey::from(s) UserSigningPubkey::from(s)
} else { } else {
warn!("User identity for our own user {} didn't contain a user signing pubkey", user_id);
continue; continue;
}; };
@ -538,6 +543,10 @@ impl OlmMachine {
OwnUserIdentity::new(master_key, self_signing, user_signing) OwnUserIdentity::new(master_key, self_signing, user_signing)
.map(UserIdentities::Own) .map(UserIdentities::Own)
} else { } else {
warn!(
"User identity for our own user {} didn't contain a user signing pubkey",
user_id
);
continue; continue;
} }
} else { } else {
@ -545,9 +554,19 @@ impl OlmMachine {
}; };
match identity { match identity {
Ok(i) => changed.push(i), Ok(i) => {
Err(_e) => { trace!(
// TODO log some error here "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; continue;
} }
} }