diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/Accounts.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/Accounts.java index 4bd9b3d41..8e6adf473 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/Accounts.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/Accounts.java @@ -267,8 +267,9 @@ public class Accounts extends AbstractDynamoDbStore { if (conditionalCheckFailed(phoneNumberConstraintCancellationReason) || conditionalCheckFailed(phoneNumberIdentifierConstraintCancellationReason)) { - // In theory, both reasons should trip in tandem and either should give us the information we need. Even so, - // we'll be cautious here and make sure we're choosing a condition check that really failed. + // Both reasons should trip in tandem and either should give us the information we need. However, phone number + // canonicalization can cause multiple e164s to have the same PNI, so we make sure we're choosing a condition + // check that really failed. final CancellationReason reason = conditionalCheckFailed(phoneNumberConstraintCancellationReason) ? phoneNumberConstraintCancellationReason : phoneNumberIdentifierConstraintCancellationReason;