Improve logging around retries archiving sessions.

This commit is contained in:
Greyson Parrelli
2024-02-21 13:04:42 -05:00
parent 9071fd0024
commit 8fc9893ecd

View File

@@ -657,12 +657,16 @@ open class MessageContentProcessor(private val context: Context) {
return return
} }
if (decryptionErrorMessage.ratchetKey.isPresent && if (decryptionErrorMessage.ratchetKey.isPresent) {
ratchetKeyMatches(requester, metadata.sourceDeviceId, decryptionErrorMessage.ratchetKey.get()) if (ratchetKeyMatches(requester, metadata.sourceDeviceId, decryptionErrorMessage.ratchetKey.get())) {
) { warn(envelope.timestamp!!, "[RetryReceipt-I] Ratchet key matches. Archiving the session.")
warn(envelope.timestamp!!, "[RetryReceipt-I] Ratchet key matches. Archiving the session.") ApplicationDependencies.getProtocolStore().aci().sessions().archiveSession(requester.requireServiceId(), metadata.sourceDeviceId)
ApplicationDependencies.getProtocolStore().aci().sessions().archiveSession(requester.requireServiceId(), metadata.sourceDeviceId) archivedSession = true
archivedSession = true } else {
log(envelope.timestamp!!, "[RetryReceipt-I] Ratchet key does not match. Leaving the session as-is.")
}
} else {
warn(envelope.timestamp!!, "[RetryReceipt-I] Missing ratchet key! Can't archive session.")
} }
if (messageLogEntry != null) { if (messageLogEntry != null) {