From 5627ed141b17f30b8f733818f65309369aa8749c Mon Sep 17 00:00:00 2001 From: Chris Eager Date: Fri, 22 Nov 2024 14:35:58 -0600 Subject: [PATCH] Update phone number/PNI constraint cancellation reason comment --- .../org/whispersystems/textsecuregcm/storage/Accounts.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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;