fix new error reported from rust side

This commit is contained in:
valere 2023-02-02 16:15:53 +01:00
parent 1b4885ccab
commit ebed3195bf

View file

@ -468,10 +468,13 @@ internal class OlmMachine @Inject constructor(
)
} catch (throwable: Throwable) {
val reThrow = when (throwable) {
is DecryptionException.Megolm -> {
// TODO more bindings for missing room key
is DecryptionException.MissingRoomKey -> {
MXCryptoError.Base(MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID, throwable.message.orEmpty())
}
is DecryptionException.Megolm -> {
// TODO check if it's the correct binding?
MXCryptoError.Base(MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX, throwable.message.orEmpty())
}
is DecryptionException.Identifier -> {
MXCryptoError.Base(MXCryptoError.ErrorType.BAD_EVENT_FORMAT, MXCryptoError.BAD_EVENT_FORMAT_TEXT_REASON)
}