FIx / inbound session bad migration
This commit is contained in:
parent
f4314ebdae
commit
69eaf2695e
|
@ -182,7 +182,8 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi
|
||||||
try {
|
try {
|
||||||
val oldSerializedData = obj.getString("olmInboundGroupSessionData")
|
val oldSerializedData = obj.getString("olmInboundGroupSessionData")
|
||||||
deserializeFromRealm<MXOlmInboundGroupSession2>(oldSerializedData)?.let { mxOlmInboundGroupSession2 ->
|
deserializeFromRealm<MXOlmInboundGroupSession2>(oldSerializedData)?.let { mxOlmInboundGroupSession2 ->
|
||||||
val newOlmInboundGroupSessionWrapper2 = OlmInboundGroupSessionWrapper2()
|
val sessionKey = mxOlmInboundGroupSession2.mSession.sessionIdentifier()
|
||||||
|
val newOlmInboundGroupSessionWrapper = OlmInboundGroupSessionWrapper(sessionKey, false)
|
||||||
.apply {
|
.apply {
|
||||||
olmInboundGroupSession = mxOlmInboundGroupSession2.mSession
|
olmInboundGroupSession = mxOlmInboundGroupSession2.mSession
|
||||||
roomId = mxOlmInboundGroupSession2.mRoomId
|
roomId = mxOlmInboundGroupSession2.mRoomId
|
||||||
|
@ -191,7 +192,7 @@ internal class RealmCryptoStoreMigration @Inject constructor(private val crossSi
|
||||||
forwardingCurve25519KeyChain = mxOlmInboundGroupSession2.mForwardingCurve25519KeyChain
|
forwardingCurve25519KeyChain = mxOlmInboundGroupSession2.mForwardingCurve25519KeyChain
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.setString("olmInboundGroupSessionData", serializeForRealm(newOlmInboundGroupSessionWrapper2))
|
obj.setString("olmInboundGroupSessionData", serializeForRealm(newOlmInboundGroupSessionWrapper))
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Timber.e(e, "Error")
|
Timber.e(e, "Error")
|
||||||
|
|
Loading…
Reference in New Issue