cleaning and logs

This commit is contained in:
valere 2023-01-03 09:52:58 +01:00
parent 76fa1bfee5
commit 54e8debc38
3 changed files with 10 additions and 3 deletions

View File

@ -24,7 +24,13 @@ import javax.inject.Inject
internal class EventDecryptor @Inject constructor(val decryptRoomEventUseCase: DecryptRoomEventUseCase) {
@Throws(MXCryptoError::class)
@Suppress("UNUSED_PARAMETER")
suspend fun decryptEvent(event: Event, timeline: String): MXEventDecryptionResult {
return decryptRoomEventUseCase.invoke(event)
}
@Suppress("UNUSED_PARAMETER")
suspend fun decryptEventAndSaveResult(event: Event, timeline: String) {
return decryptRoomEventUseCase.decryptAndSaveResult(event)
}
}

View File

@ -80,6 +80,7 @@ import org.matrix.android.sdk.internal.crypto.tasks.DeleteDeviceTask
import org.matrix.android.sdk.internal.crypto.tasks.GetDeviceInfoTask
import org.matrix.android.sdk.internal.crypto.tasks.GetDevicesTask
import org.matrix.android.sdk.internal.crypto.tasks.SetDeviceNameTask
import org.matrix.android.sdk.internal.crypto.tasks.toDeviceTracingId
import org.matrix.android.sdk.internal.crypto.verification.RustVerificationService
import org.matrix.android.sdk.internal.di.DeviceId
import org.matrix.android.sdk.internal.di.UserId
@ -587,6 +588,8 @@ internal class RustCryptoService @Inject constructor(
// Notify the our listeners about room keys so decryption is retried.
toDeviceEvents.events.orEmpty().forEach { event ->
Timber.tag(loggerTag.value).d("Processed ToDevice event msgid:${event.toDeviceTracingId()}")
if (event.getClearType() == EventType.ENCRYPTED) {
// rust failed to decrypt it
matrixConfiguration.cryptoAnalyticsPlugin?.onFailToDecryptToDevice(

View File

@ -24,8 +24,8 @@ import im.vector.app.R
import im.vector.app.core.epoxy.bottomSheetDividerItem
import im.vector.app.core.resources.ColorProvider
import im.vector.app.core.resources.StringProvider
import im.vector.app.core.ui.list.genericFooterItem
import im.vector.app.core.ui.list.ItemStyle
import im.vector.app.core.ui.list.genericFooterItem
import im.vector.app.features.crypto.verification.epoxy.bottomSheetSelfWaitItem
import im.vector.app.features.crypto.verification.epoxy.bottomSheetVerificationActionItem
import im.vector.app.features.crypto.verification.epoxy.bottomSheetVerificationNoticeItem
@ -41,7 +41,6 @@ import im.vector.app.features.crypto.verification.user.renderSasTransaction
import im.vector.app.features.crypto.verification.user.renderStartTransactionOptions
import im.vector.app.features.crypto.verification.user.verifiedSuccessTile
import im.vector.app.features.html.EventHtmlRenderer
import im.vector.app.features.spaces.create.SpaceType
import im.vector.lib.core.utils.epoxy.charsequence.toEpoxyCharSequence
import org.matrix.android.sdk.api.session.crypto.verification.CancelCode
import org.matrix.android.sdk.api.session.crypto.verification.EVerificationState
@ -127,7 +126,6 @@ class SelfVerificationController @Inject constructor(
val pendingRequest = state.pendingRequest.invoke()
when (pendingRequest.state) {
EVerificationState.WaitingForReady -> {
genericFooterItem {
id("open_other")
style(ItemStyle.NORMAL_TEXT)