Skip to content

Commit

Permalink
Match account deletion number by short NSN.
Browse files Browse the repository at this point in the history
Fixes #13583.
  • Loading branch information
nicholas-signal authored and valldrac committed Jun 27, 2024
1 parent a2dfd4f commit dbcc399
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ void submit() {
number.setCountryCode(countryCode);
number.setNationalNumber(nationalNumber);

if (PhoneNumberUtil.getInstance().isNumberMatch(number, Recipient.self().requireE164()) == PhoneNumberUtil.MatchType.EXACT_MATCH) {
final PhoneNumberUtil.MatchType matchType = PhoneNumberUtil.getInstance().isNumberMatch(number, Recipient.self().requireE164());
if (matchType == PhoneNumberUtil.MatchType.EXACT_MATCH || matchType == PhoneNumberUtil.MatchType.SHORT_NSN_MATCH || matchType == PhoneNumberUtil.MatchType.NSN_MATCH) {
events.setValue(DeleteAccountEvent.ConfirmDeletion.INSTANCE);
} else {
events.setValue(DeleteAccountEvent.NotAMatch.INSTANCE);
Expand Down

0 comments on commit dbcc399

Please sign in to comment.