X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/b615a4b04dc7b6b64888bcccba901f0682f78692..9075cc1a309fbc90276d2878d480d1e9e9c81887:/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java diff --git a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java index a1c06075..9994ad65 100644 --- a/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java +++ b/lib/src/main/java/org/asamk/signal/manager/ManagerImpl.java @@ -70,7 +70,6 @@ import org.whispersystems.libsignal.ecc.ECPublicKey; import org.whispersystems.libsignal.util.guava.Optional; import org.whispersystems.signalservice.api.SignalSessionLock; import org.whispersystems.signalservice.api.messages.SendMessageResult; -import org.whispersystems.signalservice.api.messages.SignalServiceAttachmentRemoteId; import org.whispersystems.signalservice.api.messages.SignalServiceDataMessage; import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope; import org.whispersystems.signalservice.api.messages.SignalServiceReceiptMessage; @@ -904,11 +903,11 @@ public class ManagerImpl implements Manager { receiveThread = new Thread(() -> { while (!Thread.interrupted()) { try { - receiveMessagesInternal(1L, TimeUnit.HOURS, false, (envelope, decryptedContent, e) -> { + receiveMessagesInternal(1L, TimeUnit.HOURS, false, (envelope, e) -> { synchronized (messageHandlers) { for (ReceiveMessageHandler h : messageHandlers) { try { - h.handleMessage(envelope, decryptedContent, e); + h.handleMessage(envelope, e); } catch (Exception ex) { logger.warn("Message handler failed, ignoring", ex); } @@ -1140,7 +1139,7 @@ public class ManagerImpl implements Manager { } @Override - public File getAttachmentFile(SignalServiceAttachmentRemoteId attachmentId) { + public File getAttachmentFile(String attachmentId) { return attachmentHelper.getAttachmentFile(attachmentId); } @@ -1298,11 +1297,6 @@ public class ManagerImpl implements Manager { this.identityHelper.handleIdentityFailure(recipientId, identityFailure); } - @Override - public SignalServiceAddress resolveSignalServiceAddress(SignalServiceAddress address) { - return resolveSignalServiceAddress(resolveRecipient(address)); - } - private SignalServiceAddress resolveSignalServiceAddress(RecipientId recipientId) { final var address = account.getRecipientStore().resolveRecipientAddress(recipientId); if (address.getUuid().isPresent()) { @@ -1347,6 +1341,10 @@ public class ManagerImpl implements Manager { } } + private RecipientId resolveRecipient(RecipientAddress address) { + return account.getRecipientStore().resolveRecipient(address); + } + private RecipientId resolveRecipient(SignalServiceAddress address) { return account.getRecipientStore().resolveRecipient(address); }