Releases: matrix-org/matrix-rust-sdk
matrix-sdk-crypto-ffi-0.17.0
Production-ready version of iOS Crypto SDK, containing precompiled matrix-sdk-crypto-ffi Apple framework.
matrix-sdk 0.17.0
What's Changed
Features
- [breaking]
Room::is_dmwas renamed toRoom::compute_is_dmto match its behavior, since it'll now compute and cache the result. A new synchronousRoom::is_dmfunction was added which centralizes the logic of checking if something is a DM based on that cached value and the providedDmRoomDefinition.Room::sync_memberswill also now compute active service members. (#6537) - [breaking] Enforce atomic and synchronized updates to
RoomInfo. RequiresStateStore::save_changesto acquire state store lock and replacesRoom::set_room_infowith an atomic version,Room::update_room_info, which is also synchronized by the state store lock. (#6478) - Added
beaconandbeacon_infofields toRoomPowerLevelChanges, allowing callers to read and update the power levels required to send beacon (live location) message events and beacon info state events respectively. (#6540) - Added
DmRoomDefinitionas a parameter ofClientBuilderso we can specify it when creating a Client. Also added aRoom::is_dmmethod and added some logic to use the new DM definitions inClient::get_dm_roomsand when using message search. (#6490) - Sharing encrypted history on room invite, per MSC4268 is now enabled by default (though can still be disabled via
ClientBuilder::with_enable_share_history_on_invite). (#6497) - Add
Client::get_dm_roomsfunction to get an iterator with the DMs for the provided user id. (#6487) - Support the stable
m.key_backupprefix for MSC4287: Sharing key backup preference between clients. (#6410) - Add new high-level search helpers in
matrix_sdk_ui::searchto perform searches for messages in a room or across all rooms. (#6394) - Latest Event does not emit an update when it computes the same value as the previous Latest Event (#6396)
- Add support for pushing the backup key to other clients, and receiving a pushed backup key from other clients (MSC4385), gated behind the
experimental-push-secretsfeature. (#6432) - Add
room_versions()&account_moderation()toHomeserverCapabilities. (#6413) - Enable sending redaction events through the send queue via
RoomSendQueue::redact. This includes local echoes for redaction events through the newLocalEchoContent::Redactionvariant. (#6250) - [breaking] Remove support for
native-tlsand remove all feature flags for selecting TLS backend, asrustlsis the now the only supported TLS backend. (#6409) - [breaking] Added
HomeserverCapabilitiesandClient::homeserver_capabilities()to get the capabilities of the homeserver. This replacesClient::get_capabilities(). (#6371) - [breaking]
matrix_sdk::error::Errorhas a new variantTimeoutwhich occurs when a cross-signing reset does not succeed after some period of time. (#6325) - The
beacon_infostart event (MSC3672) is now included when computing the latest event for a room, so live location sharing sessions can be surfaced as a room's most recent activity. (#6295) - [breaking] The
EventCacheErroris nowCloneable, which implied marking a few other error types asCloneable, and wrapping a few other error variants withArc. (#6305) - [breaking]: The unread count computation has now moved from the sliding sync processing, to the event cache. As a result, it is necessary to enable the event cache if you want to keep a precise unread counts, using
Client::event_cache().subscribe(). The unread counts will now also be available even if you used a previous version of sync (v2), as long as you've enabled the event cache beforehand. (#6253) - [breaking]
room::reply::Eventhas a new fieldadd_mentionswhich is passed forward inroom::reply::make_reply_event. (#6270) - Add
Recovery::recover_and_fix_backupto automatically fix key storage backup if the private backup decryption key is missing, invalid or inconsistent with the public key. (#6252) - Attempt to import stored room key bundles for rooms awaiting bundles at client startup. (#6215)
- Add
OAuth::cached_server_metadata()that caches the authorization server metadata for a while. (#6217) - Add
QRCodeGrantLoginError::SecureChannelfor secure channel errors (#6141 - Add
QRCodeGrantLoginError::UnexpectedMessagefor protocol message errors (#6141 - Add
QRCodeGrantLoginError::LoginFailurefor login failure errors received from the other device (#6141 - Add
QRCodeGrantLoginError::DeviceNotFoundfor when the requested device was not returned by the homeserver (#6141 - Add
Client::subscribe_to_duplicate_key_upload_errorsfor listening to duplicate key upload errors from/keys/upload. (#6135) - Add
Room::pin_eventandRoom::unpin_event, which allow pinning and unpinning events from a room. These were extracted from thematrix_sdk_uicrate, with no changes in functionality. (#6106) LatestEventValue::RemoteInviteis added to handle a Latest Event for invite room. (#6056)- Add
Room::set_own_member_display_nameto set the current user's display name within only the one single room (can be used for /myroomnick functionality). (#5981) - Sending
MessageLikeandRawMessageLikeevents through aRoomnow returns the usedEncryptionInfo, if any. (#5936) - [breaking]: The new Latest Event API replaces the old API. All the
new_prefixes have been removed, thusRoom::new_latest_eventbecomes and overwrites theRoom::latest_eventvalue. The new Latest Event values stored inRoomInfoare also erased once during the first update of the SDK. The new values will be re-calculated. The following types or functions are removed:PossibleLatestEvent,is_suitable_for_latest_event, andLatestEvent(replaced byLatestEventValue). See the documentation ofmatrix_sdk::latest_eventto learn about the new API. (#5624) - Expose a new method
RoomEventCache::find_event_relationsfor loading events relating to a specific event ID from the cache. (#5930) - Replace in-memory stores with IndexedDB implementations when initializing
ClientwithBuilderStoreConfig::IndexedDb. (#5946) - Call: Add support for the new Intents for voice only calls
Intent.StartCallDmVoiceandIntent.JoinExistingDmVoice. (#6003) - Add
SlidingSync::unsubscribe_to_roomsandSlidingSync::clear_and_subscribe_to_rooms. (#6012) - [breaking] Sliding Sync has a new
PollTimeouttype, used bySlidingSyncBuilder::requires_timeout. (#6005) - Inviting a user to a room with
Client::enable_share_history_on_inviteset to true will now trigger a download of all historical keys for the room in question from the client's key backup. (#6017) - Add widget partial support for MSC4039. Allows widgets to download non-encrypted files from the content repository (like avatars). (#6354)
Breaking Changes
- [breaking]
LiveLocationShareshas been renamed toLiveLocationsObserverandRoom::live_location_sharestoRoom::live_locations_observer. (#6446) Room::observe_live_location_shareshas been replaced byRoom::live_locations_observer. The new API returns aLiveLocationsObserverstruct with asubscribe()method that provides an initial snapshot (Vector<LiveLocationShare>) and a batched stream ofVectorDiffupdates, instead of emitting individualLiveLocationShareitems as beacon events arrive. The initial snapshot is loaded from the event cache on creation, includes the own user's sh...
matrix-sdk 0.16.1
matrix-sdk 0.16.0
You may be wondering what happened to the 0.15.0 release, and you’re right to ask. Unfortunately, it had to be yanked after a problematic Git dependency slipped through during publishing.
This created a situation where some SDK crates were successfully released as 0.15.0, while others failed to publish. To avoid confusion and maintain consistency, the entire 0.15.0 release was yanked.
What's Changed
Features
- Add
Client::get_store_sizes()so to query the size of the existing stores, if available. (#5911) - Add
QRCodeLoginError::NotFoundfor non-existing / expired rendezvous sessions
(#5898) - Add
QRCodeGrantLoginError::NotFoundfor non-existing / expired rendezvous sessions
(#5898) - Improve logging around key history bundles when joining a room.
(#5866) - Expose the power level required to modify
m.space.childon
room::power_levels::RoomPowerLevelChanges.
(#5857) - Add the
Client::server_versions_cached()method.
(#5853) - Extend
authentication::oauth::OAuth::grant_login_with_qr_codeto support granting
login by scanning a QR code on the existing device.
(#5818) - Add a new
RequestConfig::skip_auth()option. This is useful to ensure that
certain request won't ever include an authorization header.
(#5822) - Add support for extended profile fields with
Account::fetch_profile_field_of(),
Account::fetch_profile_field_of_static(),Account::set_profile_field()and
Account::delete_profile_field().
(#5771) - [breaking] Remove the
matrix-sdk-cryptore-export.
(#5769) - Allow
Client::get_dm_room()to be called without thee2e-encryptioncrate feature.
(#5787) - [breaking] Add
encryption::secret_storage::SecretStorageError::ImportErrorto indicate
an error that occurred when importing a secret from secret storage.
(#5647) - [breaking] Add
authentication::oauth::qrcode::login::LoginProgress::SyncingSecretsto
indicate that secrets are being synced between the two devices.
(#5760) - Add
authentication::oauth::OAuth::grant_login_with_qr_codeto reciprocate a login by
generating a QR code on the existing device.
(#5801) - [breaking]
OAuth::login_with_qr_codenow returns a builder that allows performing the flow with either the
current device scanning or generating the QR code. Additionally, new errorsSecureChannelError::CannotReceiveCheckCode
andQRCodeLoginError::ServerResetwere added.
(#5711) - [breaking]
ThreadedEventsLoader::newnow takes optionaltokensparameter to customise where the pagination
begins (#5678. - Make
PaginationTokenspub, as well as itspreviousandnexttokens so they can be assigned from other files
(#5678. - Add new API to decline calls (MSC4310):
Room::make_decline_call_eventandRoom::subscribe_to_call_decline_events
(#5614)
Refactor
-
[breaking]:
Client::server_vendor_info()requires to enable the
federation-apifeature.
(#5912) -
[breaking]:
Client::reset_server_info()has been split into
reset_supported_versions()andreset_well_known().
(#5910) -
[breaking]:
Client::send()has extra bounds where
Request::Authentication: AuthScheme<Input<'a> = SendAccessToken<'a>>and
Request::PathBuilder: SupportedPathBuilder. This method should still work for any request to the
Client-Server API. This allows to drop theHttpError::NotClientRequesterror in favor of a
compile-time error.
(#5781,
#5789,
#5815) -
[breaking]: The
waveformfield was moved fromAttachmentInfo::VoicetoBaseAudioInfo,
allowing to set it for any audio message. Its format also changed, and it is now a list off32
between 0 and 1.
(#5732) -
[breaking] The
captionandformatted_captionfields and methods ofAttachmentConfig,
GalleryConfigandGalleryItemInfohave been merged into a single field that uses
TextMessageEventContent.
(#5733) -
The Matrix SDK crate now uses the 2024 edition of Rust.
(#5677) -
[breaking] Make
LoginProgress::EstablishingSecureChannelgeneric in order to reuse it
for the currently missing QR login flow.
(#5750) -
[breaking] The
new_virtual_element_call_widgetnow uses apropsand aconfigparameter instead of onlyprops.
This splits the configuration of the widget into required properties ("widget_id", "parent_url"...) so the widget can work
and optional config parameters ("skip_lobby", "header", "...").
The config option should in most cases only provide the"intent"property.
All other config options will then be chosen by EC based on platform +intent.Before:
new_virtual_element_call_widget( VirtualElementCallWidgetProperties { widget_id: "my_widget_id", // required property skip_lobby: Some(true), // optional configuration preload: Some(true), // optional configuration // ... } )
Now:
new_virtual_element_call_widget( VirtualElementCallWidgetProperties { widget_id: "my_widget_id", // required property // ... only required properties }, VirtualElementCallWidgetConfig { intend: Intend.StartCallDM, // defines the default values for all other configuration skip_lobby: Some(false), // overwrite a specific default value ..VirtualElementCallWidgetConfig::default() // set all other config options to `None`. Use defaults from intent. } )
(#5560)
Bugfix
- A new local
LatestEventValuewas always created asLocalIsSending. It
must be created asLocalCannotBeSentif a previous localLatestEventValue
exists and isLocalCannotBeSent.
(#5908) - Switch QR login implementation from
std::time::Instanttoruma::time::Instantwhich
is compatible with Wasm.
(#5889)
matrix-sdk-base 0.14.1
What's Changed
Security Fixes
- Fix a panic in the
RoomMember::normalized_power_levelmethod.
(#5635) (Low, CVE-2025-59047, GHSA-qhj8-q5r6-8q6j).
matrix-sdk 0.14.0
What's Changed
Features
-
Client::fetch_thread_subscriptionsimplements support for the companion endpoint of the experimental MSC4308, allowing to fetch thread subscriptions for a given range, as specified by the MSC.
(#5590) -
Add a
Client::joined_space_roomsmethod that allows retrieving the list of joined spaces. -
Room::enable_encryptionandRoom::enable_encryption_with_state_event_encryptionwill poll the encryption state for up to 3 seconds, rather than checking once after a single sync has completed.
(#5559) -
Add
Room::enable_encryption_with_stateto enable E2E encryption with encrypted state event support, gated behind theexperimental-encrypted-state-eventsfeature.
(#5557) -
Add
ignore_timeout_on_first_syncto theSyncSettings, which should allow to have a quicker first response when using one of thesync,sync_with_callback,sync_with_result_callbackorsync_streammethods onClient, if the response is empty.
(#5481) -
The methods to use the
/v3/syncendpoint set theuse_state_afterfield, which means that, if the server supports it, the response will contain the state changes between the last sync and the end of the timeline.
(#5488) -
Add experimental support for MSC4306, with the
Room::fetch_thread_subscription(),Room::subscribe_thread()andRoom::unsubscribe_thread()methods.
(#5439) -
[breaking]
RoomMemberRolehas a newCreatorvariant, that differentiates room creators with infinite power levels, as introduced in room version 12.
(#5436) -
Add
Account::fetch_account_data_staticto fetch account data from the server with a statically-known type, with a signature similar toAccount::account_data.
(#5424) -
Add support to accept historic room key bundles that arrive out of order, i.e. the bundle arrives after the invite has already been accepted.
(#5322) -
[breaking]
OAuth::loginnow allows requesting additional scopes for the authorization code grant.
(#5395)
Refactor
- [breaking] Upgrade ruma to 0.13.0
(#5623) - [breaking]
SyncSettingstoken is nowSyncTokenenum type which has default behaviour ofSyncToken::ReusePrevioustoken. This breaksClient::sync_once. For old behaviour, set the token toSyncToken::NoTokenwith the usualSyncSettings::tokensetter. - [breaking] Change the upload_encrypted_file and make it clone the client instead of owning it. The lifetime of the
UploadEncryptedFilerequest returned byClient::upload_encrypted_file()only depends on the request lifetime now. - [breaking] Add an
IsPrefix = Falsebound to theaccount_data()andfetch_account_data_static()methods ofAccount. These methods only worked for events where the full event type is statically-known, and this is now enforced at compile-time.account_data_raw()andfetch_account_data()respectively can be used instead for event types with a variable suffix.
(#5444) - [breaking]
RoomMemberRole::suggested_role_for_power_level()andRoomMemberRole::suggested_power_level()now useUserPowerLevelto represent power levels instead ofi64to differentiate the infinite power level of creators, as introduced in room version 12.
(#5436) - [breaking] The
reasonargument ofRoom::report_room()is now required, due to a clarification in the spec.
(#5337) - [breaking] The
join_rulefield ofRoomPreviewis now aJoinRuleSummary. It has the same variants asSpaceRoomJoinRulebut contains as summary of the allow rules for the restricted variants.
(#5337) - [breaking] The MSRV has been bumped to Rust 1.88.
(#5431) - [breaking]
Room::send_call_notificationandRoom::send_call_notification_if_neededhave been removed, since the event type they send is outdated, andClientis not actually supposed to be able to join MatrixRTC sessions (yet). In practice, users of these methods probably already rely on another MatrixRTC implementation to participate in sessions, and such an implementation should be capable of sending notifications itself.
Bugfix
- The event handlers APIs now properly support events whose type is not fully statically-known. Before, those events would never trigger an event handler.
(#5444) - All HTTP requests now have a default
read_timeoutof 60s, which means they'll disconnect if the connection stalls.
RequestConfig::timeoutis now optional and can be disabled on a per-request basis. This will be done for the requests used to download media, so they don't get cancelled after the default 30s timeout for no good reason.
(#5437)
matrix-sdk 0.13.0
What's Changed
Security Fixes
- Fix SQL injection vulnerability in
EventCache
(d0c0100, Moderate, CVE-2025-53549, GHSA-275g-g844-73jh)
Bug fixes
- When joining a room via
Client::join_room_by_id(), if the client hasenable_share_history_on_inviteenabled,
we will correctly check for received room key bundles. Previously this was only done when callingRoom::join.
(#5043)
Features
- Add
Client::supported_versions(), which returns the results of bothClient::server_versions()and
Client::unstable_features()with a single call.
(#5357) WidgetDriver::send_to_deviceNow supports sending encrypted to-device messages.
(#5252)Client::add_event_handler: SetOption<EncryptionInfo>inEventHandlerDatafor to-device messages.
If the to-device message was encrypted, theEncryptionInfowill be set. If it isNonethe message was sent in clear.
(#5099)EventCache::subscribe_to_room_generic_updatesis added to subscribe to all
room updates without having to subscribe to all rooms individually
(#5247)- [breaking] The element call widget URL configuration struct uses the new
headerurl parameter
instead of the now deprecatedhideHeaderparameter. This is only compatible with EC v0.13.0 or newer. - [breaking]
RoomEventCacheGenericUpdategains a newClearvariant, and sees
itsTimelineUpdatedvariant being renamed toUpdateTimeline.
(#5363)
Refactor
- [breaking]:
Client::unstable_features()returns aBTreeSet<FeatureFlag>, containing only
the features whose value was set to true in the response to the/versionsendpoint.
(#5357) ClientServerCapabilitieshas been renamed toClientServerInfo. Alongside this,
Client::reset_server_infois nowClient::reset_server_infoandClient::fetch_server_capabilities
is nowClient::fetch_server_versions, returning the server versions response directly.
(#5167)RoomEventCacheListeneris renamedRoomEventCacheSubscriber
(#5269)RoomPreview::join_ruleis now optional, and will be set toNoneif the join rule state event
is missing for a given room.
(#5278)
Bug fixes
m.room.avatarhas been added as required state for sliding sync until the existing backend issue
causing deleted room avatars to not be flagged is fixed. (#5293)
matrix-sdk-crypto-ffi-0.11.1
What's Changed
Security Fixes
- Check the sender of an event matches owner of session, preventing sender spoofing by homeserver owners.
13c1d20 (High, CVE-2025-48937, GHSA-x958-rvg6-956w).
Bug Fixes
matrix-sdk-crypto 0.11.1
What's Changed
Security Fixes
- Check the sender of an event matches owner of session, preventing sender spoofing by homeserver owners.
13c1d20 (High, CVE-2025-48937, GHSA-x958-rvg6-956w).
Bug Fixes
matrix-sdk 0.12.0
What's Changed
Security Fixes
- Check the sender of an event matches owner of session, preventing sender spoofing by homeserver owners.
13c1d20 (High, CVE-2025-48937, GHSA-x958-rvg6-956w).
Features
Client::send_call_notification_if_needednow returnsResult<bool>instead ofResult<()>so we can check if
the event was sent.- Added
SendMediaUploadRequestwrapper forSendRequest, which checks the size of the request to
upload making sure it doesn't exceed them.upload.sizevalue that can be fetched through
Client::load_or_fetch_max_upload_size. - Add
ClientBuilder::with_enable_share_history_on_inviteto enable experimental support for sharing encrypted room history on invite, per MSC4268.
(#5141) Room::list_threads()is a new method to list all the threads in a room.
(#4972)Room::relations()is a new method to list all the events related to another event
("relations"), with additional filters for relation type or relation type + event type.
(#4972)- The
EventCache's persistent storage has been enabled by default. This means that all the events
received by sync or back-paginations will be stored, in memory or on disk, by default, as soon as
EventCache::subscribe()has been called (which happens automatically if you're using the
matrix_sdk_ui::Timeline). This offers offline access and super quick back-paginations (when the
cache has been filled) whenever the event cache is enabled. It's also not possible to disable the
persistent storage anymore. Note that by default, the event cache store uses an in-memory store,
so the events will be lost when the process exits. To store the events on disk, you need to use
the sqlite event cache store.
(#4308) Room::set_unread_flag()now sets the stablem.marked_unreadroom account data, which was
stabilized in Matrix 1.12.Room::is_marked_unread()also ignores the unstable
com.famedly.marked_unreadroom account data if the stable variant is present.
(#5034)Encryption::encrypt_and_send_raw_to_device: Introduced as an experimental method for
sending custom encrypted to-device events. This feature is gated behind the
experimental-send-custom-to-deviceflag, as it remains under active development and may undergo changes.
(4998)Room::send_single_receipt()andRoom::send_multiple_receipts()now also unset the unread
flag of the room if an unthreaded read receipt is sent.
(#5055)Client::is_user_ignored(&UserId)can be used to check if a user is currently ignored.- (#5081)
RoomSendQueue::send_galleryhas been added to allow sending MSC4274-style media galleries
via the send queue under theunstable-msc4274feature.
(#4977)
Bug fixes
- A invited DM room joined with
Client::join_room_by_id()orClient::join_room_by_id_or_alias()
will now be correctly marked as a DM.
(#5043) - API responses with an HTTP status code
520won't be retried anymore, as this is used by some proxies
(including Cloudflare) to warn that an unknown error has happened in the actual server.
(#5105)
Refactor
Room::push_context()has been renamed intoRoom::push_condition_room_ctx(). The newer
Room::push_contextnow returns amatrix_sdk::Room::PushContext, which can be used to compute
the push actions for any event.
(#4962)Room::decrypt_event()now requires an extramatrix_sdk::Room::PushContextparameter to
compute the push notifications for the decrypted event.
(#4962)SlidingSyncRoomhas been removed. With it, theSlidingSync::get_room,
get_all_rooms,get_rooms,get_number_of_rooms, and
FrozenSlidingSyncmethods and type have been removed.
(#5047)Room::set_unread_flag()is now a no-op if the unread flag already has the wanted value.
(#5055)