This commit is contained in:
Niels Andriesse 2019-07-15 15:06:52 +10:00
parent 208ac71bfe
commit 862288abfd

View File

@ -277,11 +277,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
else if (message.isGroupUpdate()) handleGroupMessage(content, message, smsMessageId); else if (message.isGroupUpdate()) handleGroupMessage(content, message, smsMessageId);
else if (message.isExpirationUpdate()) handleExpirationUpdate(content, message, smsMessageId); else if (message.isExpirationUpdate()) handleExpirationUpdate(content, message, smsMessageId);
else if (isMediaMessage) handleMediaMessage(content, message, smsMessageId); else if (isMediaMessage) handleMediaMessage(content, message, smsMessageId);
else if (message.getBody().isPresent()) { else if (message.getBody().isPresent()) handleTextMessage(content, message, smsMessageId);
// Loki - Handle friend request logic
handleTextMessage(content, message, smsMessageId);
handleFriendRequestIfNeeded(envelope, content, message);
}
if (message.getGroupInfo().isPresent() && groupDatabase.isUnknownGroup(GroupUtil.getEncodedId(message.getGroupInfo().get().getGroupId(), false))) { if (message.getGroupInfo().isPresent() && groupDatabase.isUnknownGroup(GroupUtil.getEncodedId(message.getGroupInfo().get().getGroupId(), false))) {
handleUnknownGroupMessage(content, message.getGroupInfo().get()); handleUnknownGroupMessage(content, message.getGroupInfo().get());
@ -294,6 +290,9 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
if (content.isNeedsReceipt()) { if (content.isNeedsReceipt()) {
handleNeedsDeliveryReceipt(content, message); handleNeedsDeliveryReceipt(content, message);
} }
// Loki - Handle friend request logic if needed
handleFriendRequestIfNeeded(envelope, content, message);
} else if (content.getSyncMessage().isPresent()) { } else if (content.getSyncMessage().isPresent()) {
TextSecurePreferences.setMultiDevice(context, true); TextSecurePreferences.setMultiDevice(context, true);