From 313a9c9432704853f98ea413e80140f1b667d1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 10 Oct 2025 11:04:11 +0200 Subject: [PATCH 1/3] chore: Remove the matrix-sdk-crypto re-export in the matrix-sdk crate --- .../timeline/controller/decryption_retry_task.rs | 8 +++----- crates/matrix-sdk-ui/src/timeline/event_handler.rs | 2 +- .../src/timeline/event_item/content/mod.rs | 6 ++++-- .../matrix-sdk-ui/src/timeline/tests/encryption.rs | 6 ++++-- crates/matrix-sdk-ui/src/timeline/tests/mod.rs | 8 ++++++-- crates/matrix-sdk-ui/src/timeline/traits.rs | 5 +++-- crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs | 2 +- crates/matrix-sdk/CHANGELOG.md | 2 ++ crates/matrix-sdk/src/client/builder/mod.rs | 4 ++-- crates/matrix-sdk/src/encryption/backups/mod.rs | 5 ++--- crates/matrix-sdk/src/lib.rs | 2 -- crates/matrix-sdk/src/room/mod.rs | 8 +++++--- crates/matrix-sdk/src/room/shared_room_history.rs | 7 +++++-- crates/matrix-sdk/src/send_queue/mod.rs | 4 ++-- .../matrix-sdk/src/test_utils/mocks/encryption.rs | 2 +- .../tests/integration/encryption/backups.rs | 13 ++++++------- 16 files changed, 47 insertions(+), 37 deletions(-) diff --git a/crates/matrix-sdk-ui/src/timeline/controller/decryption_retry_task.rs b/crates/matrix-sdk-ui/src/timeline/controller/decryption_retry_task.rs index bbf9c8c3d02..d83a38c76bf 100644 --- a/crates/matrix-sdk-ui/src/timeline/controller/decryption_retry_task.rs +++ b/crates/matrix-sdk-ui/src/timeline/controller/decryption_retry_task.rs @@ -23,12 +23,12 @@ use imbl::Vector; use itertools::{Either, Itertools as _}; use matrix_sdk::{ Client, Room, - crypto::store::types::RoomKeyInfo, deserialized_responses::TimelineEventKind as SdkTimelineEventKind, encryption::backups::BackupState, event_handler::EventHandlerHandle, executor::{JoinHandle, spawn}, }; +use matrix_sdk_base::crypto::store::types::RoomKeyInfo; use tokio::sync::{ RwLock, mpsc::{self, Receiver, Sender}, @@ -516,10 +516,8 @@ mod tests { use std::{collections::BTreeMap, sync::Arc, time::SystemTime}; use imbl::vector; - use matrix_sdk::{ - crypto::types::events::UtdCause, - deserialized_responses::{AlgorithmInfo, EncryptionInfo, VerificationState}, - }; + use matrix_sdk::deserialized_responses::{AlgorithmInfo, EncryptionInfo, VerificationState}; + use matrix_sdk_base::crypto::types::events::UtdCause; use ruma::{ MilliSecondsSinceUnixEpoch, OwnedTransactionId, events::room::{ diff --git a/crates/matrix-sdk-ui/src/timeline/event_handler.rs b/crates/matrix-sdk-ui/src/timeline/event_handler.rs index 169a769666c..285ec6ea133 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_handler.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_handler.rs @@ -17,10 +17,10 @@ use std::{borrow::Cow, sync::Arc}; use as_variant::as_variant; use indexmap::IndexMap; use matrix_sdk::{ - crypto::types::events::UtdCause, deserialized_responses::{EncryptionInfo, UnableToDecryptInfo}, send_queue::SendHandle, }; +use matrix_sdk_base::crypto::types::events::UtdCause; use ruma::{ EventId, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedTransactionId, OwnedUserId, TransactionId, diff --git a/crates/matrix-sdk-ui/src/timeline/event_item/content/mod.rs b/crates/matrix-sdk-ui/src/timeline/event_item/content/mod.rs index 13bb387fcc4..f913786b1d0 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_item/content/mod.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_item/content/mod.rs @@ -15,8 +15,10 @@ use std::sync::Arc; use as_variant::as_variant; -use matrix_sdk::crypto::types::events::UtdCause; -use matrix_sdk_base::latest_event::{PossibleLatestEvent, is_suitable_for_latest_event}; +use matrix_sdk_base::{ + crypto::types::events::UtdCause, + latest_event::{PossibleLatestEvent, is_suitable_for_latest_event}, +}; use ruma::{ OwnedDeviceId, OwnedEventId, OwnedMxcUri, OwnedUserId, UserId, events::{ diff --git a/crates/matrix-sdk-ui/src/timeline/tests/encryption.rs b/crates/matrix-sdk-ui/src/timeline/tests/encryption.rs index 28e2f6aca4c..c117408c4e6 100644 --- a/crates/matrix-sdk-ui/src/timeline/tests/encryption.rs +++ b/crates/matrix-sdk-ui/src/timeline/tests/encryption.rs @@ -27,13 +27,15 @@ use assert_matches2::assert_let; use eyeball_im::VectorDiff; use matrix_sdk::{ assert_next_matches_with_timeout, - crypto::{OlmMachine, decrypt_room_key_export, types::events::UtdCause}, deserialized_responses::{ AlgorithmInfo, DecryptedRoomEvent, EncryptionInfo, VerificationLevel, VerificationState, }, test_utils::test_client_builder, }; -use matrix_sdk_base::deserialized_responses::{TimelineEvent, UnableToDecryptReason}; +use matrix_sdk_base::{ + crypto::{OlmMachine, decrypt_room_key_export, types::events::UtdCause}, + deserialized_responses::{TimelineEvent, UnableToDecryptReason}, +}; use matrix_sdk_test::{ALICE, BOB, async_test}; use ruma::{ assign, event_id, diff --git a/crates/matrix-sdk-ui/src/timeline/tests/mod.rs b/crates/matrix-sdk-ui/src/timeline/tests/mod.rs index ffd119511c3..45f0927cd31 100644 --- a/crates/matrix-sdk-ui/src/timeline/tests/mod.rs +++ b/crates/matrix-sdk-ui/src/timeline/tests/mod.rs @@ -29,14 +29,18 @@ use indexmap::IndexMap; use matrix_sdk::{ BoxFuture, config::RequestConfig, - crypto::{DecryptionSettings, OlmMachine, RoomEventDecryptionResult, TrustRequirement}, deserialized_responses::{EncryptionInfo, TimelineEvent}, paginators::{PaginableRoom, PaginatorError, thread::PaginableThread}, room::{EventWithContextResponse, Messages, MessagesOptions, PushContext, Relations}, send_queue::RoomSendQueueUpdate, }; use matrix_sdk_base::{ - RoomInfo, RoomState, crypto::types::events::CryptoContextInfo, latest_event::LatestEvent, + RoomInfo, RoomState, + crypto::{ + DecryptionSettings, OlmMachine, RoomEventDecryptionResult, TrustRequirement, + types::events::CryptoContextInfo, + }, + latest_event::LatestEvent, }; use matrix_sdk_test::{ALICE, DEFAULT_TEST_ROOM_ID, event_factory::EventFactory}; use ruma::{ diff --git a/crates/matrix-sdk-ui/src/timeline/traits.rs b/crates/matrix-sdk-ui/src/timeline/traits.rs index 05b795fb4aa..23fb7d891b1 100644 --- a/crates/matrix-sdk-ui/src/timeline/traits.rs +++ b/crates/matrix-sdk-ui/src/timeline/traits.rs @@ -18,12 +18,13 @@ use eyeball::Subscriber; use indexmap::IndexMap; use matrix_sdk::{ AsyncTraitDeps, Result, Room, SendOutsideWasm, - crypto::types::events::CryptoContextInfo, deserialized_responses::{EncryptionInfo, TimelineEvent}, paginators::{PaginableRoom, thread::PaginableThread}, room::PushContext, }; -use matrix_sdk_base::{RoomInfo, latest_event::LatestEvent}; +use matrix_sdk_base::{ + RoomInfo, crypto::types::events::CryptoContextInfo, latest_event::LatestEvent, +}; use ruma::{ EventId, OwnedEventId, OwnedTransactionId, OwnedUserId, UserId, events::{ diff --git a/crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs b/crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs index abe425bcbc9..b962ca91282 100644 --- a/crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs +++ b/crates/matrix-sdk-ui/src/unable_to_decrypt_hook.rs @@ -26,12 +26,12 @@ use std::{ use growable_bloom_filter::{GrowableBloom, GrowableBloomBuilder}; use matrix_sdk::{ Client, - crypto::types::events::UtdCause, executor::{JoinHandle, spawn}, sleep::sleep, }; use matrix_sdk_base::{ SendOutsideWasm, StateStoreDataKey, StateStoreDataValue, StoreError, SyncOutsideWasm, + crypto::types::events::UtdCause, }; use ruma::{ EventId, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedServerName, UserId, diff --git a/crates/matrix-sdk/CHANGELOG.md b/crates/matrix-sdk/CHANGELOG.md index b46512f5938..037a2df6f1e 100644 --- a/crates/matrix-sdk/CHANGELOG.md +++ b/crates/matrix-sdk/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. ### Features +- [**breaking**] Remove the `matrix-sdk-crypto` re-export. + ([#5769](https://github.com/matrix-org/matrix-rust-sdk/pull/5769)) - [**breaking**] Add `encryption::secret_storage::SecretStorageError::ImportError` to indicate an error that occurred when importing a secret from secret storage. ([#5647](https://github.com/matrix-org/matrix-rust-sdk/pull/5647)) diff --git a/crates/matrix-sdk/src/client/builder/mod.rs b/crates/matrix-sdk/src/client/builder/mod.rs index 47c3da41ffa..9933af32678 100644 --- a/crates/matrix-sdk/src/client/builder/mod.rs +++ b/crates/matrix-sdk/src/client/builder/mod.rs @@ -26,6 +26,8 @@ use std::{collections::BTreeSet, fmt, sync::Arc}; use homeserver_config::*; #[cfg(feature = "e2e-encryption")] use matrix_sdk_base::crypto::DecryptionSettings; +#[cfg(feature = "e2e-encryption")] +use matrix_sdk_base::crypto::{CollectStrategy, TrustRequirement}; use matrix_sdk_base::{BaseClient, ThreadingSupport, store::StoreConfig}; #[cfg(feature = "sqlite")] use matrix_sdk_sqlite::SqliteStoreConfig; @@ -39,8 +41,6 @@ use tracing::{Span, debug, field::debug, instrument}; use super::{Client, ClientInner}; #[cfg(feature = "e2e-encryption")] -use crate::crypto::{CollectStrategy, TrustRequirement}; -#[cfg(feature = "e2e-encryption")] use crate::encryption::EncryptionSettings; #[cfg(not(target_family = "wasm"))] use crate::http_client::HttpSettings; diff --git a/crates/matrix-sdk/src/encryption/backups/mod.rs b/crates/matrix-sdk/src/encryption/backups/mod.rs index 3f75878d8cd..621e9829ae7 100644 --- a/crates/matrix-sdk/src/encryption/backups/mod.rs +++ b/crates/matrix-sdk/src/encryption/backups/mod.rs @@ -55,12 +55,11 @@ use tracing::{Span, error, info, instrument, trace, warn}; pub mod futures; pub(crate) mod types; +use matrix_sdk_base::crypto::olm::ExportedRoomKey; pub use types::{BackupState, UploadState}; use self::futures::WaitForSteadyState; -use crate::{ - Client, Error, Room, crypto::olm::ExportedRoomKey, encryption::BackupDownloadStrategy, -}; +use crate::{Client, Error, Room, encryption::BackupDownloadStrategy}; /// The backups manager for the [`Client`]. #[derive(Debug, Clone)] diff --git a/crates/matrix-sdk/src/lib.rs b/crates/matrix-sdk/src/lib.rs index b724e707aaa..7bb23a985e7 100644 --- a/crates/matrix-sdk/src/lib.rs +++ b/crates/matrix-sdk/src/lib.rs @@ -20,8 +20,6 @@ pub use async_trait::async_trait; pub use bytes; -#[cfg(feature = "e2e-encryption")] -pub use matrix_sdk_base::crypto; pub use matrix_sdk_base::{ ComposerDraft, ComposerDraftType, EncryptionState, PredecessorRoom, QueueWedgeError, Room as BaseRoom, RoomCreateWithCreatorEventContent, RoomDisplayName, RoomHero, RoomInfo, diff --git a/crates/matrix-sdk/src/room/mod.rs b/crates/matrix-sdk/src/room/mod.rs index b98ef991316..daeb6d1d081 100644 --- a/crates/matrix-sdk/src/room/mod.rs +++ b/crates/matrix-sdk/src/room/mod.rs @@ -35,7 +35,9 @@ pub use identity_status_changes::IdentityStatusChanges; #[cfg(feature = "experimental-encrypted-state-events")] use matrix_sdk_base::crypto::types::events::room::encrypted::EncryptedEvent; #[cfg(feature = "e2e-encryption")] -use matrix_sdk_base::crypto::{IdentityStatusChange, RoomIdentityProvider, UserIdentity}; +use matrix_sdk_base::crypto::{ + IdentityStatusChange, RoomIdentityProvider, UserIdentity, types::events::CryptoContextInfo, +}; pub use matrix_sdk_base::store::StoredThreadSubscription; use matrix_sdk_base::{ ComposerDraft, EncryptionState, RoomInfoNotableUpdateReasons, RoomMemberships, SendOutsideWasm, @@ -154,6 +156,8 @@ pub use self::{ Relations, RelationsOptions, ThreadRoots, }, }; +#[cfg(feature = "e2e-encryption")] +use crate::encryption::backups::BackupState; #[cfg(doc)] use crate::event_cache::EventCache; #[cfg(feature = "experimental-encrypted-state-events")] @@ -177,8 +181,6 @@ use crate::{ sync::RoomUpdate, utils::{IntoRawMessageLikeEventContent, IntoRawStateEventContent}, }; -#[cfg(feature = "e2e-encryption")] -use crate::{crypto::types::events::CryptoContextInfo, encryption::backups::BackupState}; pub mod edit; pub mod futures; diff --git a/crates/matrix-sdk/src/room/shared_room_history.rs b/crates/matrix-sdk/src/room/shared_room_history.rs index ff8fcf6a511..2ded139a4a4 100644 --- a/crates/matrix-sdk/src/room/shared_room_history.rs +++ b/crates/matrix-sdk/src/room/shared_room_history.rs @@ -14,11 +14,14 @@ use std::iter; -use matrix_sdk_base::media::{MediaFormat, MediaRequestParameters}; +use matrix_sdk_base::{ + crypto::types::events::room_key_bundle::RoomKeyBundleContent, + media::{MediaFormat, MediaRequestParameters}, +}; use ruma::{OwnedUserId, UserId, events::room::MediaSource}; use tracing::{info, instrument, warn}; -use crate::{Error, Result, Room, crypto::types::events::room_key_bundle::RoomKeyBundleContent}; +use crate::{Error, Result, Room}; /// Share any shareable E2EE history in the given room with the given recipient, /// as per [MSC4268]. diff --git a/crates/matrix-sdk/src/send_queue/mod.rs b/crates/matrix-sdk/src/send_queue/mod.rs index 9c7c66d6314..74cadc43734 100644 --- a/crates/matrix-sdk/src/send_queue/mod.rs +++ b/crates/matrix-sdk/src/send_queue/mod.rs @@ -138,6 +138,8 @@ use std::{ }; use eyeball::SharedObservable; +#[cfg(feature = "e2e-encryption")] +use matrix_sdk_base::crypto::{OlmError, SessionRecipientCollectionError}; #[cfg(feature = "unstable-msc4274")] use matrix_sdk_base::store::FinishGalleryItemInfo; use matrix_sdk_base::{ @@ -173,8 +175,6 @@ use ruma::{ use tokio::sync::{Mutex, Notify, OwnedMutexGuard, broadcast, oneshot}; use tracing::{debug, error, info, instrument, trace, warn}; -#[cfg(feature = "e2e-encryption")] -use crate::crypto::{OlmError, SessionRecipientCollectionError}; use crate::{ Client, Media, Room, TransmissionProgress, client::WeakClient, diff --git a/crates/matrix-sdk/src/test_utils/mocks/encryption.rs b/crates/matrix-sdk/src/test_utils/mocks/encryption.rs index 74a3d963b5f..04da14b7378 100644 --- a/crates/matrix-sdk/src/test_utils/mocks/encryption.rs +++ b/crates/matrix-sdk/src/test_utils/mocks/encryption.rs @@ -22,6 +22,7 @@ use std::{ }; use assert_matches2::assert_let; +use matrix_sdk_base::crypto::types::events::room::encrypted::EncryptedToDeviceEvent; use matrix_sdk_test::test_json; use ruma::{ CrossSigningKeyId, DeviceId, MilliSecondsSinceUnixEpoch, OneTimeKeyAlgorithm, OwnedDeviceId, @@ -43,7 +44,6 @@ use wiremock::{ use crate::{ Client, - crypto::types::events::room::encrypted::EncryptedToDeviceEvent, test_utils::{ client::MockClientBuilder, mocks::{Keys, MatrixMockServer}, diff --git a/crates/matrix-sdk/tests/integration/encryption/backups.rs b/crates/matrix-sdk/tests/integration/encryption/backups.rs index 655970e485b..b5eb1ef4601 100644 --- a/crates/matrix-sdk/tests/integration/encryption/backups.rs +++ b/crates/matrix-sdk/tests/integration/encryption/backups.rs @@ -21,11 +21,6 @@ use matrix_sdk::{ Client, SessionMeta, authentication::matrix::MatrixSession, config::RequestConfig, - crypto::{ - olm::{InboundGroupSession, SenderData, SessionCreationError}, - store::types::BackupDecryptionKey, - types::EventEncryptionAlgorithm, - }, encryption::{ BackupDownloadStrategy, EncryptionSettings, backups::{BackupState, UploadState, futures::SteadyStateError}, @@ -36,7 +31,11 @@ use matrix_sdk::{ test_client_builder_with_server, }, }; -use matrix_sdk_base::crypto::olm::OutboundGroupSession; +use matrix_sdk_base::crypto::{ + olm::{InboundGroupSession, OutboundGroupSession, SenderData, SessionCreationError}, + store::types::BackupDecryptionKey, + types::EventEncryptionAlgorithm, +}; use matrix_sdk_common::timeout::timeout; use matrix_sdk_test::{JoinedRoomBuilder, SyncResponseBuilder, TestResult, async_test}; use ruma::{ @@ -1422,7 +1421,7 @@ async fn test_enable_from_secret_storage_and_download_after_utd_from_old_message device_id!("KIUVQQSDTM").to_owned(), Arc::new(sender_identity_keys), room_id, - matrix_sdk::crypto::EncryptionSettings::default(), + matrix_sdk_base::crypto::EncryptionSettings::default(), )?; // Export the `OutboundGroupSession` to an `InboundGroupSession`, and export it From 89aa876c335453a8ba033bce33f1f1aafa43b41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 10 Oct 2025 11:10:46 +0200 Subject: [PATCH 2/3] fixup! chore: Remove the matrix-sdk-crypto re-export in the matrix-sdk crate --- Cargo.lock | 1 + bindings/matrix-sdk-ffi/Cargo.toml | 1 + bindings/matrix-sdk-ffi/src/client_builder.rs | 2 +- .../matrix-sdk-ffi/src/identity_status_change.rs | 2 +- bindings/matrix-sdk-ffi/src/qr_code.rs | 13 +++++-------- bindings/matrix-sdk-ffi/src/room/mod.rs | 2 +- bindings/matrix-sdk-ffi/src/timeline/msg_like.rs | 2 +- bindings/matrix-sdk-ffi/src/utd.rs | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ca900f45fa9..60ec27898c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3439,6 +3439,7 @@ dependencies = [ "language-tags", "log-panics", "matrix-sdk", + "matrix-sdk-base", "matrix-sdk-common", "matrix-sdk-ffi-macros", "matrix-sdk-ui", diff --git a/bindings/matrix-sdk-ffi/Cargo.toml b/bindings/matrix-sdk-ffi/Cargo.toml index af22edb6ca3..682fa9148de 100644 --- a/bindings/matrix-sdk-ffi/Cargo.toml +++ b/bindings/matrix-sdk-ffi/Cargo.toml @@ -54,6 +54,7 @@ matrix-sdk = { workspace = true, features = [ "sqlite", "uniffi", ] } +matrix-sdk-base.workspace = true matrix-sdk-common.workspace = true matrix-sdk-ffi-macros.workspace = true matrix-sdk-ui = { workspace = true, features = ["uniffi"] } diff --git a/bindings/matrix-sdk-ffi/src/client_builder.rs b/bindings/matrix-sdk-ffi/src/client_builder.rs index a6f9c4ffefd..71c1b7d8586 100644 --- a/bindings/matrix-sdk-ffi/src/client_builder.rs +++ b/bindings/matrix-sdk-ffi/src/client_builder.rs @@ -3,7 +3,6 @@ use std::{fs, num::NonZeroUsize, path::Path, sync::Arc, time::Duration}; #[cfg(not(target_family = "wasm"))] use matrix_sdk::reqwest::Certificate; use matrix_sdk::{ - crypto::{CollectStrategy, DecryptionSettings, TrustRequirement}, encryption::{BackupDownloadStrategy, EncryptionSettings}, event_cache::EventCacheError, ruma::{ServerName, UserId}, @@ -14,6 +13,7 @@ use matrix_sdk::{ Client as MatrixClient, ClientBuildError as MatrixClientBuildError, HttpError, IdParseError, RumaApiError, SqliteStoreConfig, ThreadingSupport, }; +use matrix_sdk_base::crypto::{CollectStrategy, DecryptionSettings, TrustRequirement}; use ruma::api::error::{DeserializationError, FromHttpResponseError}; use tracing::debug; use zeroize::Zeroizing; diff --git a/bindings/matrix-sdk-ffi/src/identity_status_change.rs b/bindings/matrix-sdk-ffi/src/identity_status_change.rs index 3fcb5a69142..8437f3b44dd 100644 --- a/bindings/matrix-sdk-ffi/src/identity_status_change.rs +++ b/bindings/matrix-sdk-ffi/src/identity_status_change.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use matrix_sdk::crypto::IdentityState; +use matrix_sdk_base::crypto::IdentityState; #[derive(uniffi::Record)] pub struct IdentityStatusChange { diff --git a/bindings/matrix-sdk-ffi/src/qr_code.rs b/bindings/matrix-sdk-ffi/src/qr_code.rs index 4a2e9666863..52467f54754 100644 --- a/bindings/matrix-sdk-ffi/src/qr_code.rs +++ b/bindings/matrix-sdk-ffi/src/qr_code.rs @@ -1,10 +1,7 @@ use std::sync::Arc; -use matrix_sdk::{ - authentication::oauth::qrcode::{ - self, DeviceCodeErrorResponseType, LoginFailureReason, QrProgress, - }, - crypto::types::qr_login::{LoginQrCodeDecodeError, QrCodeModeData}, +use matrix_sdk::authentication::oauth::qrcode::{ + self, DeviceCodeErrorResponseType, LoginFailureReason, QrProgress, }; use matrix_sdk_common::{SendOutsideWasm, SyncOutsideWasm}; @@ -34,8 +31,8 @@ impl QrCodeData { /// will return `None`. pub fn server_name(&self) -> Option { match &self.inner.mode_data { - QrCodeModeData::Reciprocate { server_name } => Some(server_name.to_owned()), - QrCodeModeData::Login => None, + qrcode::QrCodeModeData::Reciprocate { server_name } => Some(server_name.to_owned()), + qrcode::QrCodeModeData::Login => None, } } } @@ -47,7 +44,7 @@ pub enum QrCodeDecodeError { #[error("Error decoding QR code: {error:?}")] Crypto { #[from] - error: LoginQrCodeDecodeError, + error: qrcode::LoginQrCodeDecodeError, }, } diff --git a/bindings/matrix-sdk-ffi/src/room/mod.rs b/bindings/matrix-sdk-ffi/src/room/mod.rs index e12e5a679e9..a7ff52e19ec 100644 --- a/bindings/matrix-sdk-ffi/src/room/mod.rs +++ b/bindings/matrix-sdk-ffi/src/room/mod.rs @@ -3,7 +3,7 @@ use std::{collections::HashMap, pin::pin, sync::Arc}; use anyhow::{Context, Result}; use futures_util::{pin_mut, StreamExt}; use matrix_sdk::{ - crypto::LocalTrust, + encryption::LocalTrust, room::{ edit::EditedContent, power_levels::RoomPowerLevelChanges, Room as SdkRoom, RoomMemberRole, TryFromReportedContentScoreError, diff --git a/bindings/matrix-sdk-ffi/src/timeline/msg_like.rs b/bindings/matrix-sdk-ffi/src/timeline/msg_like.rs index 8283b20a209..d72691d2931 100644 --- a/bindings/matrix-sdk-ffi/src/timeline/msg_like.rs +++ b/bindings/matrix-sdk-ffi/src/timeline/msg_like.rs @@ -14,7 +14,7 @@ use std::{collections::HashMap, sync::Arc}; -use matrix_sdk::crypto::types::events::UtdCause; +use matrix_sdk_base::crypto::types::events::UtdCause; use ruma::events::{room::MediaSource as RumaMediaSource, MessageLikeEventContent}; use super::{ diff --git a/bindings/matrix-sdk-ffi/src/utd.rs b/bindings/matrix-sdk-ffi/src/utd.rs index bb0356b62e9..64ac6645aef 100644 --- a/bindings/matrix-sdk-ffi/src/utd.rs +++ b/bindings/matrix-sdk-ffi/src/utd.rs @@ -14,7 +14,7 @@ use std::{fmt::Debug, sync::Arc, time::Duration}; -use matrix_sdk::crypto::types::events::UtdCause; +use matrix_sdk_base::crypto::types::events::UtdCause; use matrix_sdk_common::{SendOutsideWasm, SyncOutsideWasm}; use matrix_sdk_ui::unable_to_decrypt_hook::{ UnableToDecryptHook, UnableToDecryptInfo as SdkUnableToDecryptInfo, From 48b2f942392f7fcaa708a93663d588e35e20a186 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Fri, 10 Oct 2025 11:26:30 +0200 Subject: [PATCH 3/3] fixup! chore: Remove the matrix-sdk-crypto re-export in the matrix-sdk crate --- testing/matrix-sdk-integration-testing/src/tests/e2ee/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/matrix-sdk-integration-testing/src/tests/e2ee/mod.rs b/testing/matrix-sdk-integration-testing/src/tests/e2ee/mod.rs index 194768f040c..3cf97bd204c 100644 --- a/testing/matrix-sdk-integration-testing/src/tests/e2ee/mod.rs +++ b/testing/matrix-sdk-integration-testing/src/tests/e2ee/mod.rs @@ -9,7 +9,6 @@ use assert_matches2::assert_let; use assign::assign; use matrix_sdk::{ Client, assert_next_eq_with_timeout, - crypto::{SasState, format_emojis}, encryption::{ BackupDownloadStrategy, EncryptionSettings, LocalTrust, backups::BackupState, @@ -33,6 +32,7 @@ use matrix_sdk::{ }, timeout::timeout, }; +use matrix_sdk_base::crypto::{SasState, format_emojis}; use matrix_sdk_ui::{ notification_client::{NotificationClient, NotificationProcessSetup}, sync_service::SyncService,