mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Update dependency org.matrix.rustcomponents:sdk-android to v26.06.11 (#7014)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.06.11 * Fix broken API changes: add new `ContentScanner` error type. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
+1
@@ -15,6 +15,7 @@ sealed class ClientException(message: String, val details: String?, cause: Throw
|
||||
details = details,
|
||||
cause = cause
|
||||
)
|
||||
class ContentScanner(message: String, val reason: ContentScannerErrorReason) : ClientException(message, null, null)
|
||||
class Other(message: String, cause: Throwable? = null) : ClientException(message, null, cause)
|
||||
}
|
||||
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2026 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.matrix.api.exception
|
||||
|
||||
enum class ContentScannerErrorReason {
|
||||
MCS_MALFORMED_JSON,
|
||||
MCS_MEDIA_FAILED_TO_DECRYPT,
|
||||
M_MISSING_TOKEN,
|
||||
M_UNKNOWN_TOKEN,
|
||||
M_NOT_FOUND,
|
||||
MCS_MEDIA_NOT_CLEAN,
|
||||
MCS_MIME_TYPE_FORBIDDEN,
|
||||
MCS_BAD_DECRYPTION,
|
||||
M_UNKNOWN,
|
||||
MCS_MEDIA_REQUEST_FAILED;
|
||||
|
||||
companion object;
|
||||
|
||||
fun isDangerous(): Boolean = when (this) {
|
||||
MCS_MEDIA_NOT_CLEAN, MCS_MIME_TYPE_FORBIDDEN -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user