mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Improve logging
This commit is contained in:
parent
5cb98d8fc3
commit
a907d78916
@ -1451,6 +1451,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
|
||||
}
|
||||
|
||||
if (SessionMetaProtocol.shouldIgnoreMessage(content)) {
|
||||
Log.d("Loki", "Ignoring duplicate message.");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user