mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-22 16:17:31 -04:00
Add HumanQrLoginError::UnsupportedQrCodeType and HumanQrGrantLoginError::UnsupportedQrCodeType
This commit is contained in:
committed by
Damir Jelić
parent
b6c4bca5a0
commit
acda2e88e3
@@ -36,6 +36,12 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
### Features
|
||||
|
||||
- Add `HumanQrLoginError::UnsupportedQrCodeType` for when a QR is parseable but cannot be used to
|
||||
complete a login.
|
||||
([#6141](https://github.com/matrix-org/matrix-rust-sdk/pull/6285)
|
||||
- Add `HumanQrGrantLoginError::UnsupportedQrCodeType` for when a QR is parseable but cannot be used
|
||||
to grant a login.
|
||||
([#6141](https://github.com/matrix-org/matrix-rust-sdk/pull/6285)
|
||||
- Add the `QrCodeData::base_url` and `QrCodeData::intent` methods.
|
||||
([#6283](https://github.com/matrix-org/matrix-rust-sdk/pull/6283))
|
||||
- Add `Encryption::recover_and_fix_backup` to automatically fix key storage backup if the
|
||||
|
||||
@@ -332,6 +332,8 @@ pub enum HumanQrLoginError {
|
||||
CheckCodeCannotBeSent,
|
||||
#[error("The rendezvous session was not found and might have expired")]
|
||||
NotFound,
|
||||
#[error("The QR code specifies an unsupported protocol version")]
|
||||
UnsupportedQrCodeType,
|
||||
}
|
||||
|
||||
impl From<qrcode::QRCodeLoginError> for HumanQrLoginError {
|
||||
@@ -362,8 +364,10 @@ impl From<qrcode::QRCodeLoginError> for HumanQrLoginError {
|
||||
SecureChannelError::Utf8(_)
|
||||
| SecureChannelError::MessageDecode(_)
|
||||
| SecureChannelError::Json(_)
|
||||
| SecureChannelError::RendezvousChannel(_)
|
||||
| SecureChannelError::UnsupportedQrCodeType => HumanQrLoginError::Unknown,
|
||||
| SecureChannelError::RendezvousChannel(_) => HumanQrLoginError::Unknown,
|
||||
SecureChannelError::UnsupportedQrCodeType => {
|
||||
HumanQrLoginError::UnsupportedQrCodeType
|
||||
}
|
||||
SecureChannelError::SecureChannelMessage { .. }
|
||||
| SecureChannelError::Ecies(_)
|
||||
| SecureChannelError::InvalidCheckCode
|
||||
@@ -442,6 +446,10 @@ pub enum HumanQrGrantLoginError {
|
||||
/// devices.
|
||||
#[error("A secure connection could not have been established between the two devices.")]
|
||||
ConnectionInsecure,
|
||||
|
||||
/// The QR code specifies an unsupported protocol version.
|
||||
#[error("The QR code specifies an unsupported protocol version")]
|
||||
UnsupportedQrCodeType,
|
||||
}
|
||||
|
||||
impl From<qrcode::QRCodeGrantLoginError> for HumanQrGrantLoginError {
|
||||
@@ -463,8 +471,8 @@ impl From<qrcode::QRCodeGrantLoginError> for HumanQrGrantLoginError {
|
||||
SecureChannelError::Utf8(_)
|
||||
| SecureChannelError::MessageDecode(_)
|
||||
| SecureChannelError::Json(_)
|
||||
| SecureChannelError::RendezvousChannel(_)
|
||||
| SecureChannelError::UnsupportedQrCodeType => Self::Unknown(e.to_string()),
|
||||
| SecureChannelError::RendezvousChannel(_) => Self::Unknown(e.to_string()),
|
||||
SecureChannelError::UnsupportedQrCodeType => Self::UnsupportedQrCodeType,
|
||||
SecureChannelError::SecureChannelMessage { .. }
|
||||
| SecureChannelError::Ecies(_)
|
||||
| SecureChannelError::InvalidCheckCode
|
||||
|
||||
Reference in New Issue
Block a user