Update phone number/PNI constraint cancellation reason comment

This commit is contained in:
Chris Eager 2024-11-22 14:35:58 -06:00 committed by Chris Eager
parent e4a2af67b1
commit 5627ed141b
1 changed files with 3 additions and 2 deletions

View File

@ -267,8 +267,9 @@ public class Accounts extends AbstractDynamoDbStore {
if (conditionalCheckFailed(phoneNumberConstraintCancellationReason) if (conditionalCheckFailed(phoneNumberConstraintCancellationReason)
|| conditionalCheckFailed(phoneNumberIdentifierConstraintCancellationReason)) { || conditionalCheckFailed(phoneNumberIdentifierConstraintCancellationReason)) {
// In theory, both reasons should trip in tandem and either should give us the information we need. Even so, // Both reasons should trip in tandem and either should give us the information we need. However, phone number
// we'll be cautious here and make sure we're choosing a condition check that really failed. // 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) final CancellationReason reason = conditionalCheckFailed(phoneNumberConstraintCancellationReason)
? phoneNumberConstraintCancellationReason ? phoneNumberConstraintCancellationReason
: phoneNumberIdentifierConstraintCancellationReason; : phoneNumberIdentifierConstraintCancellationReason;