Skip to content

Commit

Permalink
fix CI issues
Browse files Browse the repository at this point in the history
  • Loading branch information
uhoreg committed Aug 28, 2024
1 parent e5a1a10 commit 6ae0df5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 14 additions & 1 deletion bindings/matrix-sdk-ffi/src/timeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -918,12 +918,21 @@ pub enum EventSendState {
///
/// Happens only when the room key recipient strategy (as set by
/// [`ClientBuilder::room_key_recipient_strategy`]) has
/// [`error_on_verified_user_problem`](CollectStrategy::DeviceBasedStrategy::error_on_verified_user_problem) set.
/// [`error_on_verified_user_problem`](CollectStrategy::DeviceBasedStrategy::error_on_verified_user_problem)
/// set, or when using [`CollectStrategy::IdentityBasedStrategy`].
VerifiedUserChangedIdentity {
/// The users that were previously verified, but are no longer
users: Vec<String>,
},

/// The user does not have cross-signing set up, but
/// [`CollectStrategy::IdentityBasedStrategy`] was used.
CrossSigningNotSetup,

/// The current device is not verified, but
/// [`CollectStrategy::IdentityBasedStrategy`] was used.
SendingFromUnverifiedDevice,

/// The local event has been sent to the server, but unsuccessfully: The
/// sending has failed.
SendingFailed {
Expand Down Expand Up @@ -977,6 +986,10 @@ fn event_send_state_from_sending_failed(error: &Error, is_recoverable: bool) ->
VerifiedUserChangedIdentity(bad_users) => EventSendState::VerifiedUserChangedIdentity {
users: bad_users.iter().map(|user_id| user_id.to_string()).collect(),
},

CrossSigningNotSetup => EventSendState::CrossSigningNotSetup,

SendingFromUnverifiedDevice => EventSendState::SendingFromUnverifiedDevice,
},

_ => EventSendState::SendingFailed { error: error.to_string(), is_recoverable },
Expand Down
8 changes: 4 additions & 4 deletions crates/matrix-sdk-crypto/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,13 @@ pub enum SessionRecipientCollectionError {
VerifiedUserChangedIdentity(Vec<OwnedUserId>),

/// Cross-signing is required for encryption when using
/// [`CollectStrategy::IdentityBased`].
#[error("Encryption failed because cross-signing is not setup on your account")]
/// [`CollectStrategy::IdentityBasedStrategy`].
#[error("Encryption failed because cross-signing is not set up on your account")]
CrossSigningNotSetup,

/// The current device needs to be verified when encrypting using
/// [`CollectStrategy::IdentityBased`]. Apps should prevent sending in the
/// UI to avoid hitting this case.
/// [`CollectStrategy::IdentityBasedStrategy`]. Apps should prevent sending
/// in the UI to avoid hitting this case.
#[error("Encryption failed because your device is not verified")]
SendingFromUnverifiedDevice,
}

0 comments on commit 6ae0df5

Please sign in to comment.