Skip to content

Commit

Permalink
fixup! crypto: add UnableToDecryptReason to UnableToDecryptInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Oct 16, 2024
1 parent 121cd6a commit f27fdd8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/matrix-sdk-crypto/src/machine/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2564,6 +2564,13 @@ pub struct EncryptionSyncChanges<'a> {
pub next_batch_token: Option<String>,
}

/// Convert a [`MegolmError`] into an [`UnableToDecryptInfo`] or a
/// [`CryptoStoreError`].
///
/// Most `MegolmError` codes are converted into a suitable
/// `UnableToDecryptInfo`. The exception is [`MegolmError::Store`], which
/// represents a problem with our datastore rather than with the message itself,
/// and is therefore returned as a `CryptoStoreError`.
fn megolm_error_to_utd_info(
raw_event: &Raw<EncryptedEvent>,
error: MegolmError,
Expand Down

0 comments on commit f27fdd8

Please sign in to comment.