]> nmode's Git Repositories - signal-cli/blobdiff - lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java
Extract getSelfProfile method
[signal-cli] / lib / src / main / java / org / asamk / signal / manager / helper / IncomingMessageHandler.java
index c4b1524cf7042c95bb773920e52fafdf1811f4ae..489be8346b24a86af6e45c3e87124d65da8e5ba4 100644 (file)
@@ -130,8 +130,7 @@ public final class IncomingMessageHandler {
                     logger.debug("Received invalid message from blocked contact, ignoring.");
                 } else {
                     final var senderProfile = context.getProfileHelper().getRecipientProfile(sender);
-                    final var selfProfile = context.getProfileHelper()
-                            .getRecipientProfile(account.getSelfRecipientId());
+                    final var selfProfile = context.getProfileHelper().getSelfProfile();
                     if ((!sender.equals(account.getSelfRecipientId()) || e.getSenderDevice() != account.getDeviceId())
                             && senderProfile != null
                             && senderProfile.getCapabilities().contains(Profile.Capability.senderKey)