Bump Rust SDK to v0.2.18 and bump app version (#2836)
* Adapt to changes in SDK:
- Remove name from MatrixRoom, we should use displayName instead.
- Remove separate invites room list.
- Added runBlocking to get the now async NotificationClient from the Rust SDK.
- Made some other functions suspend.
- Client.resolveRoomAlias now returns a roomId and via parameters, we pass the roomId.
* Add logs removal migration again as `AppMigration03` to make sure we don't leak private data in existing logs.
* Bump app version to `0.4.12`
This commit is contained in:
committed by
GitHub
parent
51df9f5297
commit
6257425344
@@ -21,6 +21,9 @@ import io.element.android.features.rageshake.api.logs.LogFilesRemover
|
||||
import io.element.android.libraries.di.AppScope
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* Remove existing logs from the device to remove any leaks of sensitive data.
|
||||
*/
|
||||
@ContributesMultibinding(AppScope::class)
|
||||
class AppMigration01 @Inject constructor(
|
||||
private val logFilesRemover: LogFilesRemover,
|
||||
|
||||
@@ -24,6 +24,10 @@ import io.element.android.libraries.sessionstorage.api.SessionStore
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* This migration sets the skip session verification preference to true for all existing sessions.
|
||||
* This way we don't force existing users to verify their session again.
|
||||
*/
|
||||
@ContributesMultibinding(AppScope::class)
|
||||
class AppMigration02 @Inject constructor(
|
||||
private val sessionStore: SessionStore,
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2024 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.element.android.features.migration.impl.migrations
|
||||
|
||||
import com.squareup.anvil.annotations.ContributesMultibinding
|
||||
import io.element.android.libraries.di.AppScope
|
||||
import javax.inject.Inject
|
||||
|
||||
/**
|
||||
* This performs the same operation as [AppMigration01], since we need to clear the local logs again.
|
||||
*/
|
||||
@ContributesMultibinding(AppScope::class)
|
||||
class AppMigration03 @Inject constructor(
|
||||
private val migration01: AppMigration01,
|
||||
) : AppMigration {
|
||||
override val order: Int = 3
|
||||
|
||||
override suspend fun migrate() {
|
||||
migration01.migrate()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2024 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.element.android.features.migration.impl.migrations
|
||||
|
||||
import io.element.android.features.rageshake.test.logs.FakeLogFilesRemover
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Test
|
||||
|
||||
class AppMigration03Test {
|
||||
@Test
|
||||
fun `test migration`() = runTest {
|
||||
val logsFileRemover = FakeLogFilesRemover()
|
||||
val migration = AppMigration03(migration01 = AppMigration01(logsFileRemover))
|
||||
|
||||
migration.migrate()
|
||||
|
||||
logsFileRemover.performLambda.assertions().isCalledOnce()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user