From 862288abfda351350cd285a301a3a396ea136b23 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Mon, 15 Jul 2019 15:06:52 +1000 Subject: [PATCH] Clean --- src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index 5b15b7472c..8b2578826f 100644 --- a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -277,11 +277,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType { else if (message.isGroupUpdate()) handleGroupMessage(content, message, smsMessageId); else if (message.isExpirationUpdate()) handleExpirationUpdate(content, message, smsMessageId); else if (isMediaMessage) handleMediaMessage(content, message, smsMessageId); - else if (message.getBody().isPresent()) { - // Loki - Handle friend request logic - handleTextMessage(content, message, smsMessageId); - handleFriendRequestIfNeeded(envelope, content, message); - } + else if (message.getBody().isPresent()) handleTextMessage(content, message, smsMessageId); if (message.getGroupInfo().isPresent() && groupDatabase.isUnknownGroup(GroupUtil.getEncodedId(message.getGroupInfo().get().getGroupId(), false))) { handleUnknownGroupMessage(content, message.getGroupInfo().get()); @@ -294,6 +290,9 @@ public class PushDecryptJob extends BaseJob implements InjectableType { if (content.isNeedsReceipt()) { handleNeedsDeliveryReceipt(content, message); } + + // Loki - Handle friend request logic if needed + handleFriendRequestIfNeeded(envelope, content, message); } else if (content.getSyncMessage().isPresent()) { TextSecurePreferences.setMultiDevice(context, true);