cleaning
This commit is contained in:
parent
9b8e45ebfe
commit
8c26592d46
@ -1412,7 +1412,7 @@ internal class DefaultKeysBackupService @Inject constructor(
|
|||||||
olmInboundGroupSessionWrapper.safeSessionId ?: return null
|
olmInboundGroupSessionWrapper.safeSessionId ?: return null
|
||||||
olmInboundGroupSessionWrapper.senderKey ?: return null
|
olmInboundGroupSessionWrapper.senderKey ?: return null
|
||||||
// Gather information for each key
|
// Gather information for each key
|
||||||
val device = olmInboundGroupSessionWrapper.senderKey?.let { cryptoStore.deviceWithIdentityKey(it) }
|
val device = cryptoStore.deviceWithIdentityKey(olmInboundGroupSessionWrapper.senderKey)
|
||||||
|
|
||||||
// Build the m.megolm_backup.v1.curve25519-aes-sha2 data as defined at
|
// Build the m.megolm_backup.v1.curve25519-aes-sha2 data as defined at
|
||||||
// https://github.com/uhoreg/matrix-doc/blob/e2e_backup/proposals/1219-storing-megolm-keys-serverside.md#mmegolm_backupv1curve25519-aes-sha2-key-format
|
// https://github.com/uhoreg/matrix-doc/blob/e2e_backup/proposals/1219-storing-megolm-keys-serverside.md#mmegolm_backupv1curve25519-aes-sha2-key-format
|
||||||
|
@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.crypto.store.db.migration
|
|||||||
import io.realm.DynamicRealm
|
import io.realm.DynamicRealm
|
||||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||||
import org.matrix.android.sdk.internal.crypto.model.InboundGroupSessionData
|
import org.matrix.android.sdk.internal.crypto.model.InboundGroupSessionData
|
||||||
import org.matrix.android.sdk.internal.crypto.model.OlmInboundGroupSessionWrapper2
|
|
||||||
import org.matrix.android.sdk.internal.crypto.store.db.deserializeFromRealm
|
import org.matrix.android.sdk.internal.crypto.store.db.deserializeFromRealm
|
||||||
import org.matrix.android.sdk.internal.crypto.store.db.model.CryptoRoomEntityFields
|
import org.matrix.android.sdk.internal.crypto.store.db.model.CryptoRoomEntityFields
|
||||||
import org.matrix.android.sdk.internal.crypto.store.db.model.OlmInboundGroupSessionEntityFields
|
import org.matrix.android.sdk.internal.crypto.store.db.model.OlmInboundGroupSessionEntityFields
|
||||||
@ -52,7 +51,7 @@ internal class MigrateCryptoTo017(realm: DynamicRealm) : RealmMigrator(realm, 17
|
|||||||
dynamicObject.getString(OlmInboundGroupSessionEntityFields.OLM_INBOUND_GROUP_SESSION_DATA)?.let { oldData ->
|
dynamicObject.getString(OlmInboundGroupSessionEntityFields.OLM_INBOUND_GROUP_SESSION_DATA)?.let { oldData ->
|
||||||
val oldWrapper = tryOrNull("Failed to convert megolm inbound group data") {
|
val oldWrapper = tryOrNull("Failed to convert megolm inbound group data") {
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
deserializeFromRealm<OlmInboundGroupSessionWrapper2?>(oldData)
|
deserializeFromRealm<org.matrix.android.sdk.internal.crypto.model.OlmInboundGroupSessionWrapper2?>(oldData)
|
||||||
}
|
}
|
||||||
val groupSession = oldWrapper?.olmInboundGroupSession
|
val groupSession = oldWrapper?.olmInboundGroupSession
|
||||||
?: return@transform Unit.also {
|
?: return@transform Unit.also {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user