diff --git a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index bc36be9978..97a06606f9 100644 --- a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -1451,6 +1451,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType { } if (SessionMetaProtocol.shouldIgnoreMessage(content)) { + Log.d("Loki", "Ignoring duplicate message."); return true; } diff --git a/src/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt b/src/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt index 0e96f90c49..2346de5078 100644 --- a/src/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt +++ b/src/org/thoughtcrime/securesms/loki/protocol/SessionManagementProtocol.kt @@ -16,7 +16,6 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences import org.whispersystems.libsignal.loki.LokiSessionResetStatus import org.whispersystems.signalservice.api.messages.SignalServiceContent import org.whispersystems.signalservice.loki.protocol.multidevice.MultiDeviceProtocol -import org.whispersystems.signalservice.loki.protocol.todo.LokiThreadFriendRequestStatus object SessionManagementProtocol { @@ -65,12 +64,13 @@ object SessionManagementProtocol { val lokiThreadDB = DatabaseFactory.getLokiThreadDatabase(context) val threadFRStatus = lokiThreadDB.getFriendRequestStatus(threadID) // If we received a friend request (i.e. also a new pre key bundle), but we were already friends with the other user, reset the session. - if (content.isFriendRequest && threadFRStatus == LokiThreadFriendRequestStatus.FRIENDS) { - val sessionStore = TextSecureSessionStore(context) - sessionStore.archiveAllSessions(content.sender) - val ephemeralMessage = EphemeralMessage.create(content.sender) - ApplicationContext.getInstance(context).jobManager.add(PushEphemeralMessageSendJob(ephemeralMessage)) - } + // FIXME: Temporarily disabled to avoid a session out of sync issue +// if (content.isFriendRequest && threadFRStatus == LokiThreadFriendRequestStatus.FRIENDS) { +// val sessionStore = TextSecureSessionStore(context) +// sessionStore.archiveAllSessions(content.sender) +// val ephemeralMessage = EphemeralMessage.create(content.sender) +// ApplicationContext.getInstance(context).jobManager.add(PushEphemeralMessageSendJob(ephemeralMessage)) +// } } @JvmStatic