mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Increase logging around username synchronization.
This commit is contained in:
committed by
Greyson Parrelli
parent
894095414a
commit
e1e117ce73
@@ -267,7 +267,16 @@ public class RefreshOwnProfileJob extends BaseJob {
|
||||
String serverUsernameHash = whoAmIResponse.getUsernameHash();
|
||||
String localUsernameHash = Base64UrlSafe.encodeBytesWithoutPadding(Username.hash(localUsername));
|
||||
|
||||
if (!hasServerUsername) {
|
||||
Log.w(TAG, "No remote username is set.");
|
||||
}
|
||||
|
||||
if (!Objects.equals(localUsernameHash, serverUsernameHash)) {
|
||||
Log.w(TAG, "Local username hash does not match server username hash.");
|
||||
}
|
||||
|
||||
if (!hasServerUsername || !Objects.equals(localUsernameHash, serverUsernameHash)) {
|
||||
Log.i(TAG, "Attempting to resynchronize username.");
|
||||
tryToReserveAndConfirmLocalUsername(localUsername, localUsernameHash);
|
||||
}
|
||||
} catch (IOException | BaseUsernameException e) {
|
||||
|
||||
Reference in New Issue
Block a user