]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java
Includ pni signatures if necessary
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / helper / IncomingMessageHandler.java
index 0f0628288e6840954aef9e2033648dccb72cf290..f80b605c81a09bbe89ea310733c2217c42f834be 100644 (file)
@@ -299,6 +299,12 @@ public final class IncomingMessageHandler {
         final var senderDeviceId = senderDeviceAddress.deviceId();
         final var destination = getDestination(envelope);
 
+        if (account.getPni().equals(destination.serviceId)) {
+            account.getRecipientStore().markNeedsPniSignature(destination.recipientId, true);
+        } else if (account.getAci().equals(destination.serviceId)) {
+            account.getRecipientStore().markNeedsPniSignature(destination.recipientId, false);
+        }
+
         if (content.getReceiptMessage().isPresent()) {
             final var message = content.getReceiptMessage().get();
             if (message.isDeliveryReceipt()) {