Skip to content

Commit

Permalink
Fix stripping the correct identifiers when merging recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
AsamK committed Sep 8, 2024
1 parent ea436ec commit d8b1a2f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ static Pair<RecipientId, List<RecipientId>> resolveRecipientTrustedLocked(

if (recipient.address().aci().isEmpty() || (
address.aci().isEmpty() && (
address.pni().isEmpty()
|| recipient.address().pni().equals(address.pni())
address.pni().isEmpty() || recipient.address().pni().equals(address.pni())
)
) || recipient.address().aci().equals(address.aci())) {
logger.debug("Got existing recipient {}, updating with high trust address", recipient.id());
Expand Down Expand Up @@ -104,7 +103,7 @@ static Pair<RecipientId, List<RecipientId>> resolveRecipientTrustedLocked(
}

for (final var recipient : recipientsToBeStripped) {
store.updateRecipientAddress(recipient.id(), recipient.address().removeIdentifiersFrom(address));
store.updateRecipientAddress(recipient.id(), recipient.address().removeIdentifiersFrom(finalAddress));
}

// Create fixed RecipientIds that won't update its id after merged
Expand Down

0 comments on commit d8b1a2f

Please sign in to comment.