Skip to content

Commit 3b84b2c

Browse files
authored
crypto-ffi: fix error message for MissingRoomKey (#4997)
This error does not necessarily mean that the session was *withheld*.
1 parent 284db61 commit 3b84b2c

File tree

1 file changed

+3
-3
lines changed
  • bindings/matrix-sdk-crypto-ffi/src

1 file changed

+3
-3
lines changed

bindings/matrix-sdk-crypto-ffi/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ pub enum DecryptionError {
7878

7979
impl From<MegolmError> for DecryptionError {
8080
fn from(value: MegolmError) -> Self {
81-
match value {
81+
match &value {
8282
MegolmError::MissingRoomKey(withheld_code) => Self::MissingRoomKey {
83-
error: "Withheld Inbound group session".to_owned(),
84-
withheld_code: withheld_code.map(|w| w.as_str().to_owned()),
83+
error: value.to_string(),
84+
withheld_code: withheld_code.as_ref().map(|w| w.as_str().to_owned()),
8585
},
8686
_ => Self::Megolm { error: value.to_string() },
8787
}

0 commit comments

Comments
 (0)