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)) {
|
if (SessionMetaProtocol.shouldIgnoreMessage(content)) {
|
||||||
|
Log.d("Loki", "Ignoring duplicate message.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ import org.thoughtcrime.securesms.util.TextSecurePreferences
|
|||||||
import org.whispersystems.libsignal.loki.LokiSessionResetStatus
|
import org.whispersystems.libsignal.loki.LokiSessionResetStatus
|
||||||
import org.whispersystems.signalservice.api.messages.SignalServiceContent
|
import org.whispersystems.signalservice.api.messages.SignalServiceContent
|
||||||
import org.whispersystems.signalservice.loki.protocol.multidevice.MultiDeviceProtocol
|
import org.whispersystems.signalservice.loki.protocol.multidevice.MultiDeviceProtocol
|
||||||
import org.whispersystems.signalservice.loki.protocol.todo.LokiThreadFriendRequestStatus
|
|
||||||
|
|
||||||
object SessionManagementProtocol {
|
object SessionManagementProtocol {
|
||||||
|
|
||||||
@ -65,12 +64,13 @@ object SessionManagementProtocol {
|
|||||||
val lokiThreadDB = DatabaseFactory.getLokiThreadDatabase(context)
|
val lokiThreadDB = DatabaseFactory.getLokiThreadDatabase(context)
|
||||||
val threadFRStatus = lokiThreadDB.getFriendRequestStatus(threadID)
|
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 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) {
|
// FIXME: Temporarily disabled to avoid a session out of sync issue
|
||||||
val sessionStore = TextSecureSessionStore(context)
|
// if (content.isFriendRequest && threadFRStatus == LokiThreadFriendRequestStatus.FRIENDS) {
|
||||||
sessionStore.archiveAllSessions(content.sender)
|
// val sessionStore = TextSecureSessionStore(context)
|
||||||
val ephemeralMessage = EphemeralMessage.create(content.sender)
|
// sessionStore.archiveAllSessions(content.sender)
|
||||||
ApplicationContext.getInstance(context).jobManager.add(PushEphemeralMessageSendJob(ephemeralMessage))
|
// val ephemeralMessage = EphemeralMessage.create(content.sender)
|
||||||
}
|
// ApplicationContext.getInstance(context).jobManager.add(PushEphemeralMessageSendJob(ephemeralMessage))
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
Loading…
x
Reference in New Issue
Block a user