From 0b16d488adc6122e7bacb6e11f5e39641fecc774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 19 Nov 2024 14:11:19 +0100 Subject: [PATCH] chore: Release matrix-sdk version 0.8.0 (#4291) Co-authored-by: Ivan Enderlin --- Cargo.lock | 18 +- Cargo.toml | 18 +- crates/matrix-sdk-base/CHANGELOG.md | 78 ++++++- crates/matrix-sdk-base/Cargo.toml | 2 +- crates/matrix-sdk-common/CHANGELOG.md | 7 + crates/matrix-sdk-common/Cargo.toml | 2 +- crates/matrix-sdk-crypto/CHANGELOG.md | 206 ++++++++--------- crates/matrix-sdk-crypto/Cargo.toml | 2 +- crates/matrix-sdk-indexeddb/CHANGELOG.md | 7 +- crates/matrix-sdk-indexeddb/Cargo.toml | 2 +- crates/matrix-sdk-qrcode/CHANGELOG.md | 3 + crates/matrix-sdk-qrcode/Cargo.toml | 2 +- crates/matrix-sdk-sqlite/CHANGELOG.md | 12 + crates/matrix-sdk-sqlite/Cargo.toml | 2 +- .../matrix-sdk-store-encryption/CHANGELOG.md | 3 + crates/matrix-sdk-store-encryption/Cargo.toml | 2 +- crates/matrix-sdk-ui/CHANGELOG.md | 33 ++- crates/matrix-sdk-ui/Cargo.toml | 2 +- crates/matrix-sdk/CHANGELOG.md | 208 ++++++++++++++---- crates/matrix-sdk/Cargo.toml | 2 +- 20 files changed, 417 insertions(+), 194 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0d23120497d..981239a578e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2882,7 +2882,7 @@ dependencies = [ [[package]] name = "matrix-sdk" -version = "0.7.1" +version = "0.8.0" dependencies = [ "anyhow", "anymap2", @@ -2958,7 +2958,7 @@ dependencies = [ [[package]] name = "matrix-sdk-base" -version = "0.7.0" +version = "0.8.0" dependencies = [ "as_variant", "assert_matches", @@ -2994,7 +2994,7 @@ dependencies = [ [[package]] name = "matrix-sdk-common" -version = "0.7.0" +version = "0.8.0" dependencies = [ "assert_matches", "async-trait", @@ -3022,7 +3022,7 @@ dependencies = [ [[package]] name = "matrix-sdk-crypto" -version = "0.7.2" +version = "0.8.0" dependencies = [ "aes", "anyhow", @@ -3145,7 +3145,7 @@ dependencies = [ [[package]] name = "matrix-sdk-indexeddb" -version = "0.7.0" +version = "0.8.0" dependencies = [ "anyhow", "assert_matches", @@ -3213,7 +3213,7 @@ dependencies = [ [[package]] name = "matrix-sdk-qrcode" -version = "0.7.1" +version = "0.8.0" dependencies = [ "byteorder", "image", @@ -3225,7 +3225,7 @@ dependencies = [ [[package]] name = "matrix-sdk-sqlite" -version = "0.7.1" +version = "0.8.0" dependencies = [ "assert_matches", "async-trait", @@ -3252,7 +3252,7 @@ dependencies = [ [[package]] name = "matrix-sdk-store-encryption" -version = "0.7.0" +version = "0.8.0" dependencies = [ "anyhow", "base64 0.22.1", @@ -3298,7 +3298,7 @@ dependencies = [ [[package]] name = "matrix-sdk-ui" -version = "0.7.0" +version = "0.8.0" dependencies = [ "anyhow", "as_variant", diff --git a/Cargo.toml b/Cargo.toml index 1a06ef22aaa..4f076807b33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,17 +79,17 @@ vodozemac = { version = "0.8.0", features = ["insecure-pk-encryption"] } wiremock = "0.6.0" zeroize = "1.6.0" -matrix-sdk = { path = "crates/matrix-sdk", version = "0.7.0", default-features = false } -matrix-sdk-base = { path = "crates/matrix-sdk-base", version = "0.7.0" } -matrix-sdk-common = { path = "crates/matrix-sdk-common", version = "0.7.0" } -matrix-sdk-crypto = { path = "crates/matrix-sdk-crypto", version = "0.7.0" } +matrix-sdk = { path = "crates/matrix-sdk", version = "0.8.0", default-features = false } +matrix-sdk-base = { path = "crates/matrix-sdk-base", version = "0.8.0" } +matrix-sdk-common = { path = "crates/matrix-sdk-common", version = "0.8.0" } +matrix-sdk-crypto = { path = "crates/matrix-sdk-crypto", version = "0.8.0" } matrix-sdk-ffi-macros = { path = "bindings/matrix-sdk-ffi-macros", version = "0.7.0" } -matrix-sdk-indexeddb = { path = "crates/matrix-sdk-indexeddb", version = "0.7.0", default-features = false } -matrix-sdk-qrcode = { path = "crates/matrix-sdk-qrcode", version = "0.7.0" } -matrix-sdk-sqlite = { path = "crates/matrix-sdk-sqlite", version = "0.7.0", default-features = false } -matrix-sdk-store-encryption = { path = "crates/matrix-sdk-store-encryption", version = "0.7.0" } +matrix-sdk-indexeddb = { path = "crates/matrix-sdk-indexeddb", version = "0.8.0", default-features = false } +matrix-sdk-qrcode = { path = "crates/matrix-sdk-qrcode", version = "0.8.0" } +matrix-sdk-sqlite = { path = "crates/matrix-sdk-sqlite", version = "0.8.0", default-features = false } +matrix-sdk-store-encryption = { path = "crates/matrix-sdk-store-encryption", version = "0.8.0" } matrix-sdk-test = { path = "testing/matrix-sdk-test", version = "0.7.0" } -matrix-sdk-ui = { path = "crates/matrix-sdk-ui", version = "0.7.0", default-features = false } +matrix-sdk-ui = { path = "crates/matrix-sdk-ui", version = "0.8.0", default-features = false } # Default release profile, select with `--release` [profile.release] diff --git a/crates/matrix-sdk-base/CHANGELOG.md b/crates/matrix-sdk-base/CHANGELOG.md index aebdc82fe75..a1a8fc2753d 100644 --- a/crates/matrix-sdk-base/CHANGELOG.md +++ b/crates/matrix-sdk-base/CHANGELOG.md @@ -2,24 +2,80 @@ All notable changes to this project will be documented in this file. -# unreleased +## [0.8.0] - 2024-11-19 +### Bug Fixes + +- Add more invalid characters for room aliases. + +- Use the `DisplayName` struct to protect against homoglyph attacks. + + +### Features - Add `BaseClient::room_key_recipient_strategy` field -- Replace the `Notification` type from Ruma in `SyncResponse` and `StateChanges` by a custom one -- The ambiguity maps in `SyncResponse` are moved to `JoinedRoom` and `LeftRoom` -- `AmbiguityCache` contains the room member's user ID + +- `AmbiguityCache` contains the room member's user ID. + +- [**breaking**] `Media::get_thumbnail` and `MediaFormat::Thumbnail` allow to + request an animated thumbnail They both take a `MediaThumbnailSettings` + instead of `MediaThumbnailSize`. + +- Consider knocked members to be part of the room for display name + disambiguation. + +- `Client::cross_process_store_locks_holder_name` is used everywhere: + - `StoreConfig::new()` now takes a + `cross_process_store_locks_holder_name` argument. + - `StoreConfig` no longer implements `Default`. + - `BaseClient::new()` has been removed. + - `BaseClient::clone_with_in_memory_state_store()` now takes a + `cross_process_store_locks_holder_name` argument. + - `BaseClient` no longer implements `Default`. + - `EventCacheStoreLock::new()` no longer takes a `key` argument. + - `BuilderStoreConfig` no longer has + `cross_process_store_locks_holder_name` field for `Sqlite` and + `IndexedDb`. + +- Make `ObservableMap::stream` works on `wasm32-unknown-unknown`. + +- Allow aborting media uploads. + +- Replace the `Notification` type from Ruma in `SyncResponse` and `StateChanges` + by a custom one. + +- Introduce a `DisplayName` struct which normalizes and sanitizes +display names. + + +### Refactor + +- [**breaking**] Rename `DisplayName` to `RoomDisplayName`. + +- Rename `AmbiguityMap` to `DisplayNameUsers`. + +- Move `event_cache_store/` to `event_cache/store/` in `matrix-sdk-base`. + +- Move `linked_chunk` from `matrix-sdk` to `matrix-sdk-common`. + +- Move `Event` and `Gap` into `matrix_sdk_base::event_cache`. + +- The ambiguity maps in `SyncResponse` are moved to `JoinedRoom` and `LeftRoom`. + - `Store::get_rooms` and `Store::get_rooms_filtered` are way faster because they don't acquire the lock for every room they read. + - `Store::get_rooms`, `Store::get_rooms_filtered` and `Store::get_room` are renamed `Store::rooms`, `Store::rooms_filtered` and `Store::room`. -- `Client::get_rooms` and `Client::get_rooms_filtered` are renamed + +- [**breaking**] `Client::get_rooms` and `Client::get_rooms_filtered` are renamed `Client::rooms` and `Client::rooms_filtered`. -- `Client::get_stripped_rooms` has finally been removed. -- `Media::get_thumbnail` and `MediaFormat::Thumbnail` allow to request an animated thumbnail - - They both take a `MediaThumbnailSettings` instead of `MediaThumbnailSize`. -- The `StateStore` methods to access data in the media cache where moved to a separate - `EventCacheStore` trait. -- The `instant` module was removed, use the `ruma::time` module instead. + +- [**breaking**] `Client::get_stripped_rooms` has finally been removed. + +- [**breaking**] The `StateStore` methods to access data in the media cache + where moved to a separate `EventCacheStore` trait. + +- [**breaking**] The `instant` module was removed, use the `ruma::time` module instead. # 0.7.0 diff --git a/crates/matrix-sdk-base/Cargo.toml b/crates/matrix-sdk-base/Cargo.toml index d54aa38ff6d..65a3246d62e 100644 --- a/crates/matrix-sdk-base/Cargo.toml +++ b/crates/matrix-sdk-base/Cargo.toml @@ -9,7 +9,7 @@ name = "matrix-sdk-base" readme = "README.md" repository = "https://github.com/matrix-org/matrix-rust-sdk" rust-version = { workspace = true } -version = "0.7.0" +version = "0.8.0" [package.metadata.docs.rs] all-features = true diff --git a/crates/matrix-sdk-common/CHANGELOG.md b/crates/matrix-sdk-common/CHANGELOG.md index ba8118892a2..3fec5ae4492 100644 --- a/crates/matrix-sdk-common/CHANGELOG.md +++ b/crates/matrix-sdk-common/CHANGELOG.md @@ -2,3 +2,10 @@ All notable changes to this project will be documented in this file. +## [0.8.0] - 2024-11-19 + +### Refactor + +- Move `linked_chunk` from `matrix-sdk` to `matrix-sdk-common`. + + diff --git a/crates/matrix-sdk-common/Cargo.toml b/crates/matrix-sdk-common/Cargo.toml index e5e0995c083..c55b7a39583 100644 --- a/crates/matrix-sdk-common/Cargo.toml +++ b/crates/matrix-sdk-common/Cargo.toml @@ -9,7 +9,7 @@ name = "matrix-sdk-common" readme = "README.md" repository = "https://github.com/matrix-org/matrix-rust-sdk" rust-version = { workspace = true } -version = "0.7.0" +version = "0.8.0" [package.metadata.docs.rs] default-target = "x86_64-unknown-linux-gnu" diff --git a/crates/matrix-sdk-crypto/CHANGELOG.md b/crates/matrix-sdk-crypto/CHANGELOG.md index 51dc8caf79f..9809ea75244 100644 --- a/crates/matrix-sdk-crypto/CHANGELOG.md +++ b/crates/matrix-sdk-crypto/CHANGELOG.md @@ -1,6 +1,70 @@ -# UNRELEASED +# Changelog -Changes: +All notable changes to this project will be documented in this file. + +## [0.8.0] - 2024-11-19 + +### Features + +- Pin identity when we withdraw verification. + +- Expose new method `OlmMachine::room_keys_withheld_received_stream`, to allow + applications to receive notifications about received `m.room_key.withheld` + events. + ([#3660](https://github.com/matrix-org/matrix-rust-sdk/pull/3660)), + ([#3674](https://github.com/matrix-org/matrix-rust-sdk/pull/3674)) + +- Expose new method `OlmMachine::clear_crypto_cache()`, with FFI bindings. + ([#3462](https://github.com/matrix-org/matrix-rust-sdk/pull/3462)) + +- Expose new method `OlmMachine::upload_device_keys()`. + ([#3457](https://github.com/matrix-org/matrix-rust-sdk/pull/3457)) + +- Expose new method `CryptoStore::import_room_keys`. + ([#3448](https://github.com/matrix-org/matrix-rust-sdk/pull/3448)) + +- Expose new method `BackupMachine::backup_version`. + ([#3320](https://github.com/matrix-org/matrix-rust-sdk/pull/3320)) + +- Add data types to parse the QR code data for the QR code login defined in. + [MSC4108](https://github.com/matrix-org/matrix-spec-proposals/pull/4108) + +- Expose new method `CryptoStore::clear_caches`. + ([#3338](https://github.com/matrix-org/matrix-rust-sdk/pull/3338)) + +- Expose new method `OlmMachine::device_creation_time`. + ([#3275](https://github.com/matrix-org/matrix-rust-sdk/pull/3275)) + +- Log more details about the Olm session after encryption and decryption. + ([#3242](https://github.com/matrix-org/matrix-rust-sdk/pull/3242)) + +- When Olm message decryption fails, report the error code(s) from the failure. + ([#3212](https://github.com/matrix-org/matrix-rust-sdk/pull/3212)) + +- Expose new methods `OlmMachine::set_room_settings` and + `OlmMachine::get_room_settings`. + ([#3042](https://github.com/matrix-org/matrix-rust-sdk/pull/3042)) + +- Add new properties `session_rotation_period` and + `session_rotation_period_msgs` to `store::RoomSettings`. + ([#3042](https://github.com/matrix-org/matrix-rust-sdk/pull/3042)) + +- Fix bug which caused `SecretStorageKey` to incorrectly reject secret storage + keys whose metadata lacked check fields. + ([#3046](https://github.com/matrix-org/matrix-rust-sdk/pull/3046)) + +- Add new API `Device::encrypt_event_raw` that allows + to encrypt an event to a specific device. + ([#3091](https://github.com/matrix-org/matrix-rust-sdk/pull/3091)) + +- Add new API `store::Store::export_room_keys_stream` that provides room + keys on demand. + +- Include event timestamps on logs from event decryption. + ([#3194](https://github.com/matrix-org/matrix-rust-sdk/pull/3194)) + + +### Refactor - Add new method `OlmMachine::try_decrypt_room_event`. ([#4116](https://github.com/matrix-org/matrix-rust-sdk/pull/4116)) @@ -8,14 +72,14 @@ Changes: - Add reason code to `matrix_sdk_common::deserialized_responses::UnableToDecryptInfo`. ([#4116](https://github.com/matrix-org/matrix-rust-sdk/pull/4116)) -- The `UserIdentity` struct has been renamed to `OtherUserIdentity` +- [**breaking**] The `UserIdentity` struct has been renamed to `OtherUserIdentity`. ([#4036](https://github.com/matrix-org/matrix-rust-sdk/pull/4036])) -- The `UserIdentities` enum has been renamed to `UserIdentity` +- [**breaking**] The `UserIdentities` enum has been renamed to `UserIdentity`. ([#4036](https://github.com/matrix-org/matrix-rust-sdk/pull/4036])) -- Change the withheld code for keys not shared due to the `IdentityBasedStrategy`, from `m.unauthorised` - to `m.unverified`. +- Change the withheld code for keys not shared due to the + `IdentityBasedStrategy`, from `m.unauthorised` to `m.unverified`. ([#3985](https://github.com/matrix-org/matrix-rust-sdk/pull/3985)) - Improve logging for undecryptable Megolm events. @@ -59,47 +123,47 @@ Changes: Breaking changes: -- `VerificationRequestState::Transitioned` now includes a new field +- [**breaking**] `VerificationRequestState::Transitioned` now includes a new field `other_device_data` of type `DeviceData`. ([#4153](https://github.com/matrix-org/matrix-rust-sdk/pull/4153)) -- `OlmMachine::decrypt_room_event` now returns a `DecryptedRoomEvent` type, +- [**breaking**] `OlmMachine::decrypt_room_event` now returns a `DecryptedRoomEvent` type, instead of the more generic `TimelineEvent` type. -- **NOTE**: this version causes changes to the format of the serialised data in +- [**breaking**] **NOTE**: this version causes changes to the format of the serialised data in the CryptoStore, meaning that, once upgraded, it will not be possible to roll back applications to earlier versions without breaking user sessions. -- Renamed `VerificationLevel::PreviouslyVerified` to +- [**breaking**] Renamed `VerificationLevel::PreviouslyVerified` to `VerificationLevel::VerificationViolation`. -- `OlmMachine::decrypt_room_event` now takes a `DecryptionSettings` argument, - which includes a `TrustRequirement` indicating the required trust level for - the sending device. When it is called with `TrustRequirement` other than - `TrustRequirement::Unverified`, it may return the new - `MegolmError::SenderIdentityNotTrusted` variant if the sending device does not - satisfy the required trust level. +- [**breaking**] `OlmMachine::decrypt_room_event` now takes a + `DecryptionSettings` argument, which includes a `TrustRequirement` indicating + the required trust level for the sending device. When it is called with + `TrustRequirement` other than `TrustRequirement::Unverified`, it may return + the new `MegolmError::SenderIdentityNotTrusted` variant if the sending device + does not satisfy the required trust level. ([#3899](https://github.com/matrix-org/matrix-rust-sdk/pull/3899)) -- Change the structure of the `SenderData` enum to separate variants for - previously-verified, unverified and verified. +- [**breaking**] Change the structure of the `SenderData` enum to separate + variants for previously-verified, unverified and verified. ([#3877](https://github.com/matrix-org/matrix-rust-sdk/pull/3877)) -- Where `EncryptionInfo` is returned it may include the new `PreviouslyVerified` - variant of `VerificationLevel` to indicate that the user was previously - verified and is no longer verified. +- [**breaking**] Where `EncryptionInfo` is returned it may include the new + `PreviouslyVerified` variant of `VerificationLevel` to indicate that the user + was previously verified and is no longer verified. ([#3877](https://github.com/matrix-org/matrix-rust-sdk/pull/3877)) -- Expose new methods `OwnUserIdentity::was_previously_verified`, +- [**breaking**] Expose new methods `OwnUserIdentity::was_previously_verified`, `OwnUserIdentity::withdraw_verification`, and `OwnUserIdentity::has_verification_violation`, which track whether our own identity was previously verified. ([#3846](https://github.com/matrix-org/matrix-rust-sdk/pull/3846)) -- Add a new `error_on_verified_user_problem` property to +- [**breaking**] Add a new `error_on_verified_user_problem` property to `CollectStrategy::DeviceBasedStrategy`, which, when set, causes `OlmMachine::share_room_key` to fail with an error if any verified users on - the recipient list have unsigned devices, or are no lonver verified. + the recipient list have unsigned devices, or are no longer verified. When `CallectStrategy::IdentityBasedStrategy` is used, `OlmMachine::share_room_key` will fail with an error if any verified users on @@ -109,103 +173,43 @@ Breaking changes: Also remove `CollectStrategy::new_device_based`: callers should construct a `CollectStrategy::DeviceBasedStrategy` directly. - `EncryptionSettings::new` now takes a `CollectStrategy` argument, instead of - a list of booleans. + `EncryptionSettings::new` now takes a `CollectStrategy` argument, instead of a + list of booleans. ([#3810](https://github.com/matrix-org/matrix-rust-sdk/pull/3810)) ([#3816](https://github.com/matrix-org/matrix-rust-sdk/pull/3816)) ([#3896](https://github.com/matrix-org/matrix-rust-sdk/pull/3896)) -- Remove the method `OlmMachine::clear_crypto_cache()`, crypto stores are not - supposed to have any caches anymore. +- [**breaking**] Remove the method `OlmMachine::clear_crypto_cache()`, crypto + stores are not supposed to have any caches anymore. -- Add a `custom_account` argument to the `OlmMachine::with_store()` method, this - allows users to learn their identity keys before they get access to the user - and device ID. +- [**breaking**] Add a `custom_account` argument to the + `OlmMachine::with_store()` method, this allows users to learn their identity + keys before they get access to the user and device ID. ([#3451](https://github.com/matrix-org/matrix-rust-sdk/pull/3451)) -- Add a `backup_version` argument to `CryptoStore`'s +- [**breaking**] Add a `backup_version` argument to `CryptoStore`'s `inbound_group_sessions_for_backup`, - `mark_inbound_group_sessions_as_backed_up` and - `inbound_group_session_counts` methods. - ([#3253](https://github.com/matrix-org/matrix-rust-sdk/pull/3253)) + `mark_inbound_group_sessions_as_backed_up` and `inbound_group_session_counts` + methods. ([#3253](https://github.com/matrix-org/matrix-rust-sdk/pull/3253)) -- Rename the `OlmMachine::invalidate_group_session` method to - `OlmMachine::discard_room_key` +- [**breaking**] Rename the `OlmMachine::invalidate_group_session` method to + `OlmMachine::discard_room_key`. -- Move `OlmMachine::export_room_keys` to `matrix_sdk_crypto::store::Store`. +- [**breaking**] Move `OlmMachine::export_room_keys` to `matrix_sdk_crypto::store::Store`. (Call it with `olm_machine.store().export_room_keys(...)`.) -- Add new `dehydrated` property to `olm::account::PickledAccount`. +- [**breaking**] Add new `dehydrated` property to `olm::account::PickledAccount`. ([#3164](https://github.com/matrix-org/matrix-rust-sdk/pull/3164)) -- Remove deprecated `OlmMachine::import_room_keys`. +- [**breaking**] Remove deprecated `OlmMachine::import_room_keys`. ([#3448](https://github.com/matrix-org/matrix-rust-sdk/pull/3448)) -- Add the `SasState::Created` variant to differentiate the state between the +- [**breaking**] Add the `SasState::Created` variant to differentiate the state between the party that sent the verification start and the party that received it. -Deprecations: - -- Deprecate `BackupMachine::import_backed_up_room_keys`. - ([#3448](https://github.com/matrix-org/matrix-rust-sdk/pull/3448)) - -Additions: - -- Expose new method `OlmMachine::room_keys_withheld_received_stream`, to allow - applications to receive notifications about received `m.room_key.withheld` - events. - ([#3660](https://github.com/matrix-org/matrix-rust-sdk/pull/3660)), - ([#3674](https://github.com/matrix-org/matrix-rust-sdk/pull/3674)) - -- Expose new method `OlmMachine::clear_crypto_cache()`, with FFI bindings - ([#3462](https://github.com/matrix-org/matrix-rust-sdk/pull/3462)) - -- Expose new method `OlmMachine::upload_device_keys()`. - ([#3457](https://github.com/matrix-org/matrix-rust-sdk/pull/3457)) - -- Expose new method `CryptoStore::import_room_keys`. +- [**breaking**] Deprecate `BackupMachine::import_backed_up_room_keys`. ([#3448](https://github.com/matrix-org/matrix-rust-sdk/pull/3448)) -- Expose new method `BackupMachine::backup_version`. - ([#3320](https://github.com/matrix-org/matrix-rust-sdk/pull/3320)) - -- Add data types to parse the QR code data for the QR code login defined in - [MSC4108](https://github.com/matrix-org/matrix-spec-proposals/pull/4108) - -- Expose new method `CryptoStore::clear_caches`. - ([#3338](https://github.com/matrix-org/matrix-rust-sdk/pull/3338)) - -- Expose new method `OlmMachine::device_creation_time`. - ([#3275](https://github.com/matrix-org/matrix-rust-sdk/pull/3275)) - -- Log more details about the Olm session after encryption and decryption. - ([#3242](https://github.com/matrix-org/matrix-rust-sdk/pull/3242)) - -- When Olm message decryption fails, report the error code(s) from the failure. - ([#3212](https://github.com/matrix-org/matrix-rust-sdk/pull/3212)) - -- Expose new methods `OlmMachine::set_room_settings` and - `OlmMachine::get_room_settings`. - ([#3042](https://github.com/matrix-org/matrix-rust-sdk/pull/3042)) - -- Add new properties `session_rotation_period` and - `session_rotation_period_msgs` to `store::RoomSettings`. - ([#3042](https://github.com/matrix-org/matrix-rust-sdk/pull/3042)) - -- Fix bug which caused `SecretStorageKey` to incorrectly reject secret storage - keys whose metadata lacked check fields. - ([#3046](https://github.com/matrix-org/matrix-rust-sdk/pull/3046)) - -- Add new API `Device::encrypt_event_raw` that allows - to encrypt an event to a specific device. - ([#3091](https://github.com/matrix-org/matrix-rust-sdk/pull/3091)) - -- Add new API `store::Store::export_room_keys_stream` that provides room - keys on demand. - -- Include event timestamps on logs from event decryption. - ([#3194](https://github.com/matrix-org/matrix-rust-sdk/pull/3194)) - # 0.7.2 diff --git a/crates/matrix-sdk-crypto/Cargo.toml b/crates/matrix-sdk-crypto/Cargo.toml index 76714b39542..12830bb60ca 100644 --- a/crates/matrix-sdk-crypto/Cargo.toml +++ b/crates/matrix-sdk-crypto/Cargo.toml @@ -9,7 +9,7 @@ name = "matrix-sdk-crypto" readme = "README.md" repository = "https://github.com/matrix-org/matrix-rust-sdk" rust-version = { workspace = true } -version = "0.7.2" +version = "0.8.0" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "docsrs"] diff --git a/crates/matrix-sdk-indexeddb/CHANGELOG.md b/crates/matrix-sdk-indexeddb/CHANGELOG.md index 993b6152e47..f66e695a48c 100644 --- a/crates/matrix-sdk-indexeddb/CHANGELOG.md +++ b/crates/matrix-sdk-indexeddb/CHANGELOG.md @@ -2,7 +2,9 @@ All notable changes to this project will be documented in this file. -# UNRELEASED +## [0.8.0] - 2024-11-19 + +### Features - Improve the efficiency of objects stored in the crypto store. ([#3645](https://github.com/matrix-org/matrix-rust-sdk/pull/3645), [#3651](https://github.com/matrix-org/matrix-rust-sdk/pull/3651)) @@ -11,3 +13,6 @@ All notable changes to this project will be documented in this file. - `save_change` performance improvement, all encryption and serialization is done now outside of the db transaction. +### Bug Fixes + +- Use the `DisplayName` struct to protect against homoglyph attacks. diff --git a/crates/matrix-sdk-indexeddb/Cargo.toml b/crates/matrix-sdk-indexeddb/Cargo.toml index 4a3a547f804..35610b05f10 100644 --- a/crates/matrix-sdk-indexeddb/Cargo.toml +++ b/crates/matrix-sdk-indexeddb/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "matrix-sdk-indexeddb" -version = "0.7.0" +version = "0.8.0" repository = "https://github.com/matrix-org/matrix-rust-sdk" description = "Web's IndexedDB Storage backend for matrix-sdk" license = "Apache-2.0" diff --git a/crates/matrix-sdk-qrcode/CHANGELOG.md b/crates/matrix-sdk-qrcode/CHANGELOG.md index ba8118892a2..dff6a57ebbf 100644 --- a/crates/matrix-sdk-qrcode/CHANGELOG.md +++ b/crates/matrix-sdk-qrcode/CHANGELOG.md @@ -2,3 +2,6 @@ All notable changes to this project will be documented in this file. +## [0.8.0] - 2024-11-19 + +No notable changes in this release. diff --git a/crates/matrix-sdk-qrcode/Cargo.toml b/crates/matrix-sdk-qrcode/Cargo.toml index 264bfe0f777..f2f3b1afbd1 100644 --- a/crates/matrix-sdk-qrcode/Cargo.toml +++ b/crates/matrix-sdk-qrcode/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "matrix-sdk-qrcode" description = "Library to encode and decode QR codes for interactive verifications in Matrix land" -version = "0.7.1" +version = "0.8.0" authors = ["Damir Jelić "] edition = "2021" homepage = "https://github.com/matrix-org/matrix-rust-sdk" diff --git a/crates/matrix-sdk-sqlite/CHANGELOG.md b/crates/matrix-sdk-sqlite/CHANGELOG.md index ba8118892a2..d525613a28c 100644 --- a/crates/matrix-sdk-sqlite/CHANGELOG.md +++ b/crates/matrix-sdk-sqlite/CHANGELOG.md @@ -2,3 +2,15 @@ All notable changes to this project will be documented in this file. +## [0.8.0] - 2024-11-19 + +### Bug Fixes + +- Use the `DisplayName` struct to protect against homoglyph attacks. + + +### Refactor + +- Move `event_cache_store/` to `event_cache/store/` in `matrix-sdk-base`. + + diff --git a/crates/matrix-sdk-sqlite/Cargo.toml b/crates/matrix-sdk-sqlite/Cargo.toml index 38ac860f89f..96f342f86a0 100644 --- a/crates/matrix-sdk-sqlite/Cargo.toml +++ b/crates/matrix-sdk-sqlite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "matrix-sdk-sqlite" -version = "0.7.1" +version = "0.8.0" edition = "2021" repository = "https://github.com/matrix-org/matrix-rust-sdk" description = "Sqlite storage backend for matrix-sdk" diff --git a/crates/matrix-sdk-store-encryption/CHANGELOG.md b/crates/matrix-sdk-store-encryption/CHANGELOG.md index ba8118892a2..dff6a57ebbf 100644 --- a/crates/matrix-sdk-store-encryption/CHANGELOG.md +++ b/crates/matrix-sdk-store-encryption/CHANGELOG.md @@ -2,3 +2,6 @@ All notable changes to this project will be documented in this file. +## [0.8.0] - 2024-11-19 + +No notable changes in this release. diff --git a/crates/matrix-sdk-store-encryption/Cargo.toml b/crates/matrix-sdk-store-encryption/Cargo.toml index 178d4f355e5..4328298929e 100644 --- a/crates/matrix-sdk-store-encryption/Cargo.toml +++ b/crates/matrix-sdk-store-encryption/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "matrix-sdk-store-encryption" -version = "0.7.0" +version = "0.8.0" edition = "2021" description = "Helpers for encrypted storage keys for the Matrix SDK" repository = "https://github.com/matrix-org/matrix-rust-sdk" diff --git a/crates/matrix-sdk-ui/CHANGELOG.md b/crates/matrix-sdk-ui/CHANGELOG.md index 1068434a5a6..e069adf9f10 100644 --- a/crates/matrix-sdk-ui/CHANGELOG.md +++ b/crates/matrix-sdk-ui/CHANGELOG.md @@ -2,29 +2,40 @@ All notable changes to this project will be documented in this file. -# unreleased +## [0.8.0] - 2024-11-19 -Breaking changes: +### Bug Fixes -- `Timeline::edit` now takes a `RoomMessageEventContentWithoutRelation`. -- `Timeline::send_attachment` now takes an `impl Into` for the path of - the file to send. -- `Timeline::item_by_transaction_id` has been renamed to `Timeline::local_item_by_transaction_id` -(always returns local echoes). - -Bug fixes: +- Disable `share_pos()` inside `RoomListService`. - `UtdHookManager` no longer re-reports UTD events as late decryptions. ([#3480](https://github.com/matrix-org/matrix-rust-sdk/pull/3480)) + - Messages that we were unable to decrypt no longer display a red padlock. ([#3956](https://github.com/matrix-org/matrix-rust-sdk/issues/3956)) -Other changes: - - `UtdHookManager` no longer reports UTD events that were already reported in a previous session. ([#3519](https://github.com/matrix-org/matrix-rust-sdk/pull/3519)) +### Features + +- Add `m.room.join_rules` to the required state. + +- `EncryptionSyncService` and `Notification` are using + `Client::cross_process_store_locks_holder_name`. + + +### Refactor + +- [**breaking**] `Timeline::edit` now takes a `RoomMessageEventContentWithoutRelation`. + +- [**breaking**] `Timeline::send_attachment` now takes an `impl Into` + for the path of the file to send. + +- [**breaking**] `Timeline::item_by_transaction_id` has been renamed to + `Timeline::local_item_by_transaction_id` (always returns local echoes). + # 0.7.0 diff --git a/crates/matrix-sdk-ui/Cargo.toml b/crates/matrix-sdk-ui/Cargo.toml index cd1293b6420..ab8f743cc88 100644 --- a/crates/matrix-sdk-ui/Cargo.toml +++ b/crates/matrix-sdk-ui/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "matrix-sdk-ui" description = "GUI-centric utilities on top of matrix-rust-sdk (experimental)." -version = "0.7.0" +version = "0.8.0" edition = "2021" repository = "https://github.com/matrix-org/matrix-rust-sdk" license = "Apache-2.0" diff --git a/crates/matrix-sdk/CHANGELOG.md b/crates/matrix-sdk/CHANGELOG.md index d7fb1387d6c..152518be3aa 100644 --- a/crates/matrix-sdk/CHANGELOG.md +++ b/crates/matrix-sdk/CHANGELOG.md @@ -1,51 +1,14 @@ -# unreleased +# Changelog -Breaking changes: +All notable changes to this project will be documented in this file. -- Renamed `VerificationLevel::PreviouslyVerified` to `VerificationLevel::VerificationViolation`. -- Add a `PreviouslyVerified` variant to `VerificationLevel` indicating that the identity is unverified and previously it was verified. -- Replace the `Notification` type from Ruma in `SyncResponse` and `Client::register_notification_handler` - by a custom one -- `Room::can_user_redact` and `Member::can_redact` are split between `*_redact_own` and `*_redact_other` -- The ambiguity maps in `SyncResponse` are moved to `JoinedRoom` and `LeftRoom` -- `AmbiguityCache` contains the room member's user ID -- Replace `impl MediaEventContent` with `&impl MediaEventContent` in - `Media::get_file`/`Media::remove_file`/`Media::get_thumbnail`/`Media::remove_thumbnail` -- A custom sliding sync proxy set with `ClientBuilder::sliding_sync_proxy` now takes precedence over a discovered proxy. -- `Client::get_profile` was moved to `Account` and renamed to `Account::fetch_user_profile_of`. `Account::get_profile` was renamed to `Account::fetch_user_profile`. -- The `HttpError::UnableToCloneRequest` error variant has been removed because it was never used or - generated by the SDK. -- The `Error::InconsistentState` error variant has been removed because it was never used or - generated by the SDK. -- The widget capabilities in the FFI now need two additional flags: `update_delayed_event`, `send_delayed_event`. -- `Room::event` now takes an optional `RequestConfig` to allow for tweaking the network behavior. -- The `instant` module was removed, use the `ruma::time` module instead. -- Add `ClientBuilder::sqlite_store_with_cache_path` to build a client that stores caches in a different directory to state/crypto. -- The `body` parameter in `get_media_file` has been replaced with a `filename` parameter now that Ruma has a `filename()` method. +## [0.8.0] - 2024-11-19 -Additions: +### Bug Fixes -- new `UserIdentity::pin` method. -- new `ClientBuilder::with_decryption_trust_requirement` method. -- new `ClientBuilder::with_room_key_recipient_strategy` method -- new `Room.set_account_data` and `Room.set_account_data_raw` RoomAccountData setters, analogous to the GlobalAccountData -- new `RequestConfig.max_concurrent_requests` which allows to limit the maximum number of concurrent requests the internal HTTP client issues (all others have to wait until the number drops below that threshold again) -- Expose new method `Client::Oidc::login_with_qr_code()`. - ([#3466](https://github.com/matrix-org/matrix-rust-sdk/pull/3466)) -- Add the `ClientBuilder::add_root_certificates()` method which re-exposes the - `reqwest::ClientBuilder::add_root_certificate()` functionality. -- Add `Room::get_user_power_level(user_id)` and `Room::get_suggested_user_role(user_id)` to be able to fetch power level info about an user without loading the room member list. -- Add new method `discard_room_key` on `Room` that allows to discard the current - outbound session for that room. Can be used by clients as a dev tool like the `/discardsession` command. -- Add a new `LinkedChunk` data structure to represents all events per room ([#3166](https://github.com/matrix-org/matrix-rust-sdk/pull/3166)). -- Add new methods for tracking (on device only) the user's recently visited rooms called `Account::track_recently_visited_room(roomId)` and `Account::get_recently_visited_rooms()` -- Add `send_call_notification` and `send_call_notification_if_needed` methods. This allows to implement sending ring events on call start. -- The `get_media_content`, `get_media_file` and `get_file` methods of the - `Media` api now support the new authenticated media endpoints. -- WidgetDriver: Support the `"delay"` field in the `send_event` widget actions. -This allows to send delayed events, as defined in [MSC4157](https://github.com/matrix-org/matrix-spec-proposals/pull/4157) +- Add more invalid characters for room aliases. -Bug fixes: +- Match the right status code in `Client::is_room_alias_available`. - Fix a bug where room keys were considered to be downloaded before backups were enabled. This bug only affects the @@ -53,6 +16,165 @@ Bug fixes: made to download a room key, if a decryption failure with a given room key would have been encountered before the backups were enabled. +### Documentation + +- Improve documentation of `Client::observe_events`. + + +### Features + + +- Add `create_room_alias` function. + +- `Client::cross_process_store_locks_holder_name` is used everywhere: + - `StoreConfig::new()` now takes a + `cross_process_store_locks_holder_name` argument. + - `StoreConfig` no longer implements `Default`. + - `BaseClient::new()` has been removed. + - `BaseClient::clone_with_in_memory_state_store()` now takes a + `cross_process_store_locks_holder_name` argument. + - `BaseClient` no longer implements `Default`. + - `EventCacheStoreLock::new()` no longer takes a `key` argument. + - `BuilderStoreConfig` no longer has + `cross_process_store_locks_holder_name` field for `Sqlite` and + `IndexedDb`. + +- `EncryptionSyncService` and `Notification` are using `Client::cross_process_store_locks_holder_name`. + +- Allow passing a custom `RequestConfig` to an upload request. + +- Retry uploads if they've failed with transient errors. + +- Implement `EventHandlerContext` for tuples. + +- Introduce a mechanism similar to `Client::add_event_handler` and + `Client::add_room_event_handler` but with a reactive programming pattern. Add + `Client::observe_events` and `Client::observe_room_events`. + + ```rust + // Get an observer. + let observer = + client.observe_events::)>(); + + // Subscribe to the observer. + let mut subscriber = observer.subscribe(); + + // Use the subscriber as a `Stream`. + let (message_event, (room, push_actions)) = subscriber.next().await.unwrap(); + ``` + + When calling `observe_events`, one has to specify the type of event (in the + example, `SyncRoomMessageEvent`) and a context (in the example, `(Room, + Vec)`, respectively for the room and the push actions). + +- Implement unwedging for media uploads. + +- Send state from state sync and not from timeline to widget ([#4254](https://github.com/matrix-org/matrix-rust-sdk/pull/4254)) + +- Allow aborting media uploads. + +- Add `RoomPreviewInfo::num_active_members`. + +- Use room directory search as another data source. + +- Check if the user is allowed to do a room mention before trying to send a call + notify event. + ([#4271](https://github.com/matrix-org/matrix-rust-sdk/pull/4271)) + +- Add `Client::cross_process_store_locks_holder_name()`. + +- Add a `PreviouslyVerified` variant to `VerificationLevel` indicating that the + identity is unverified and previously it was verified. + +- New `UserIdentity::pin` method. + +- New `ClientBuilder::with_decryption_trust_requirement` method. + +- New `ClientBuilder::with_room_key_recipient_strategy` method + +- New `Room.set_account_data` and `Room.set_account_data_raw` RoomAccountData + setters, analogous to the GlobalAccountData + +- New `RequestConfig.max_concurrent_requests` which allows to limit the maximum + number of concurrent requests the internal HTTP client issues (all others have + to wait until the number drops below that threshold again) + +- Implement proper redact handling in the widget driver. This allows the Rust + SDK widget driver to support widgets that rely on redacting. + + +### Refactor +- [**breaking**] Rename `DisplayName` to `RoomDisplayName`. + +- Improve `is_room_alias_format_valid` so it's more strict. + +- Remove duplicated fields in media event contents. + +- Use `SendHandle` for media uploads too. + +- Move `event_cache_store/` to `event_cache/store/` in `matrix-sdk-base`. + +- Move `linked_chunk` from `matrix-sdk` to `matrix-sdk-common`. + +- Move `Event` and `Gap` into `matrix_sdk_base::event_cache`. + +- Move `formatted_caption_from` to the SDK, rename it. + +- Tidy up and start commenting the widget code. + +- Get rid of `ProcessingContext` and inline it in its callers. + +- Get rid of unused `limits` parameter when constructing a `WidgetMachine`. + +- Use a specialized mutex for locking access to the state store and + `being_sent`. + +- Renamed `VerificationLevel::PreviouslyVerified` to + `VerificationLevel::VerificationViolation`. + +- [**breaking**] Replace the `Notification` type from Ruma in `SyncResponse` and + `Client::register_notification_handler` by a custom one. + +- [**breaking**] The ambiguity maps in `SyncResponse` are moved to `JoinedRoom` + and `LeftRoom`. + +- [**breaking**] `Room::can_user_redact` and `Member::can_redact` are split + between `*_redact_own` and `*_redact_other`. + +- [**breaking**] `AmbiguityCache` contains the room member's user ID. + +- [**breaking**] Replace `impl MediaEventContent` with `&impl MediaEventContent` in + `Media::get_file`/`Media::remove_file`/`Media::get_thumbnail`/`Media::remove_thumbnail` + +- [**breaking**] A custom sliding sync proxy set with + `ClientBuilder::sliding_sync_proxy` now takes precedence over a discovered + proxy. + +- [**breaking**] `Client::get_profile` was moved to `Account` and renamed to + `Account::fetch_user_profile_of`. `Account::get_profile` was renamed to + `Account::fetch_user_profile`. + +- [**breaking**] The `HttpError::UnableToCloneRequest` error variant has been + removed because it was never used or generated by the SDK. + +- [**breaking**] The `Error::InconsistentState` error variant has been removed + because it was never used or generated by the SDK. + +- [**breaking**] The widget capabilities in the FFI now need two additional + flags: `update_delayed_event`, `send_delayed_event`. + +- [**breaking**] `Room::event` now takes an optional `RequestConfig` to allow + for tweaking the network behavior. + +- [**breaking**] The `instant` module was removed, use the `ruma::time` module + instead. + +- [**breaking**] Add `ClientBuilder::sqlite_store_with_cache_path` to build a + client that stores caches in a different directory to state/crypto. + +- [**breaking**] The `body` parameter in `get_media_file` has been replaced with + a `filename` parameter now that Ruma has a `filename()` method. + # 0.7.0 Breaking changes: diff --git a/crates/matrix-sdk/Cargo.toml b/crates/matrix-sdk/Cargo.toml index 59b11de6b8c..b983f4312d7 100644 --- a/crates/matrix-sdk/Cargo.toml +++ b/crates/matrix-sdk/Cargo.toml @@ -9,7 +9,7 @@ name = "matrix-sdk" readme = "README.md" repository = "https://github.com/matrix-org/matrix-rust-sdk" rust-version = { workspace = true } -version = "0.7.1" +version = "0.8.0" [package.metadata.docs.rs] features = ["docsrs"]