mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 17:27:45 +00:00
Potentially fix message reception issue
This commit is contained in:
parent
9f8665922f
commit
f493a790be
@ -26,8 +26,8 @@ class LokiSessionResetImplementation(private val context: Context) : LokiSession
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun validatePreKeySignalMessage(sender: String, message: PreKeySignalMessage) {
|
override fun validatePreKeySignalMessage(sender: String, message: PreKeySignalMessage) {
|
||||||
val preKeyRecord = DatabaseFactory.getLokiPreKeyRecordDatabase(context).getPreKeyRecord(sender)
|
val preKeyRecord = DatabaseFactory.getLokiPreKeyRecordDatabase(context).getPreKeyRecord(sender) ?: return
|
||||||
check(preKeyRecord != null) { "Received a background message from a user without an associated pre key record." }
|
// TODO: Checking that the pre key record isn't null is causing issues when it shouldn't
|
||||||
check(preKeyRecord.id == (message.preKeyId ?: -1)) { "Received a background message from an unknown source." }
|
check(preKeyRecord.id == (message.preKeyId ?: -1)) { "Received a background message from an unknown source." }
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user