mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-25 18:38:32 +03:00
Make it compile with latest rust lib
This commit is contained in:
parent
4e6bed87e4
commit
ff17941cee
4 changed files with 11 additions and 6 deletions
|
@ -168,7 +168,7 @@ internal class OlmMachine(
|
|||
deviceObserver: DeviceUpdateObserver,
|
||||
private val requestSender: RequestSender,
|
||||
) {
|
||||
private val inner: InnerMachine = InnerMachine(user_id, device_id, path.toString())
|
||||
private val inner: InnerMachine = InnerMachine(user_id, device_id, path.toString(),null)
|
||||
private val deviceUpdateObserver = deviceObserver
|
||||
private val userIdentityUpdateObserver = UserIdentityUpdateObserver()
|
||||
private val privateKeysUpdateObserver = PrivateCrossSigningKeysUpdateObserver()
|
||||
|
|
|
@ -179,7 +179,9 @@ internal class QrCodeVerification(
|
|||
}
|
||||
|
||||
if (result != null) {
|
||||
this.sender.sendVerificationRequest(result.request)
|
||||
for (request in result.requests) {
|
||||
this.sender.sendVerificationRequest(request)
|
||||
}
|
||||
dispatchTxUpdated()
|
||||
|
||||
val signatureRequest = result.signatureRequest
|
||||
|
|
|
@ -209,7 +209,9 @@ internal class SasVerification(
|
|||
}
|
||||
|
||||
if (result != null) {
|
||||
this.sender.sendVerificationRequest(result.request)
|
||||
for (request in result.requests) {
|
||||
this.sender.sendVerificationRequest(request)
|
||||
}
|
||||
dispatchTxUpdated()
|
||||
|
||||
val signatureRequest = result.signatureRequest
|
||||
|
|
|
@ -29,21 +29,22 @@ import uniffi.olm.PickledAccount
|
|||
import uniffi.olm.PickledInboundGroupSession
|
||||
import uniffi.olm.PickledSession
|
||||
import java.nio.charset.Charset
|
||||
import javax.inject.Inject
|
||||
|
||||
private val charset = Charset.forName("UTF-8")
|
||||
|
||||
internal class ExtractMigrationDataUseCase() {
|
||||
internal class ExtractMigrationDataUseCase @Inject constructor() {
|
||||
|
||||
operator fun invoke(realm: Realm): MigrationData? {
|
||||
val pickleKey = OlmUtility.getRandomKey()
|
||||
val metadataEntity = realm.where<CryptoMetadataEntity>().findFirst() ?: return null
|
||||
|
||||
val pickleKey = OlmUtility.getRandomKey()
|
||||
val olmSessionEntities = realm.where<OlmSessionEntity>().findAll()
|
||||
val pickledSessions = olmSessionEntities.map { it.toPickledSession(pickleKey) }
|
||||
|
||||
val inboundGroupSessionEntities = realm.where<OlmInboundGroupSessionEntity>().findAll()
|
||||
val pickledInboundGroupSessions = inboundGroupSessionEntities.map { it.toPickledInboundGroupSession(pickleKey) }
|
||||
|
||||
val metadataEntity = realm.where<CryptoMetadataEntity>().findFirst() ?: return null
|
||||
val masterKey = metadataEntity.xSignMasterPrivateKey
|
||||
val userKey = metadataEntity.xSignUserPrivateKey
|
||||
val selfSignedKey = metadataEntity.xSignSelfSignedPrivateKey
|
Loading…
Reference in a new issue