mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-28 18:10:38 +00:00
Extend merge/split logging
This commit is contained in:
parent
ce813e4529
commit
1e685c7cab
2 changed files with 10 additions and 4 deletions
|
@ -83,10 +83,11 @@ public class MergeRecipientHelper {
|
|||
recipientsToBeStripped.add(recipient);
|
||||
}
|
||||
|
||||
logger.debug("Got separate recipients for high trust identifiers {}, need to merge ({}) and strip ({})",
|
||||
logger.debug("Got separate recipients for high trust identifiers {}, need to merge ({}, {}) and strip ({})",
|
||||
address,
|
||||
recipientsToBeMerged.stream().map(r -> r.id().toString()).collect(Collectors.joining(", ")),
|
||||
recipientsToBeStripped.stream().map(r -> r.id().toString()).collect(Collectors.joining(", ")));
|
||||
resultingRecipient.map(RecipientWithAddress::address),
|
||||
recipientsToBeMerged.stream().map(r -> r.address().toString()).collect(Collectors.joining(", ")),
|
||||
recipientsToBeStripped.stream().map(r -> r.address().toString()).collect(Collectors.joining(", ")));
|
||||
|
||||
RecipientAddress finalAddress = resultingRecipient.map(RecipientWithAddress::address).orElse(null);
|
||||
for (final var recipient : recipientsToBeMerged) {
|
||||
|
|
|
@ -994,7 +994,12 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re
|
|||
) throws SQLException {
|
||||
markUnregistered(connection, recipientId);
|
||||
final var address = resolveRecipientAddress(connection, recipientId);
|
||||
if (address.aci().isPresent() && address.pni().isPresent()) {
|
||||
final var needSplit = address.aci().isPresent() && address.pni().isPresent();
|
||||
logger.trace("Marking unregistered recipient {} as unregistered (and split={}): {}",
|
||||
recipientId,
|
||||
needSplit,
|
||||
address);
|
||||
if (needSplit) {
|
||||
final var numberAddress = new RecipientAddress(address.pni().get(), address.number().orElse(null));
|
||||
updateRecipientAddress(connection, recipientId, address.removeIdentifiersFrom(numberAddress));
|
||||
addNewRecipient(connection, numberAddress);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue