Skip to content

Releases: matrix-org/matrix-rust-sdk

matrix-sdk-crypto-ffi-0.17.0

26 May 14:09

Choose a tag to compare

Production-ready version of iOS Crypto SDK, containing precompiled matrix-sdk-crypto-ffi Apple framework.

matrix-sdk 0.17.0

08 May 13:00
matrix-sdk-0.17.0

Choose a tag to compare

What's Changed

Features

  • [breaking] Room::is_dm was renamed to Room::compute_is_dm to match its behavior, since it'll now compute and cache the result. A new synchronous Room::is_dm function was added which centralizes the logic of checking if something is a DM based on that cached value and the provided DmRoomDefinition. Room::sync_members will also now compute active service members. (#6537)
  • [breaking] Enforce atomic and synchronized updates to RoomInfo. Requires StateStore::save_changes to acquire state store lock and replaces Room::set_room_info with an atomic version, Room::update_room_info, which is also synchronized by the state store lock. (#6478)
  • Added beacon and beacon_info fields to RoomPowerLevelChanges, 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 DmRoomDefinition as a parameter of ClientBuilder so we can specify it when creating a Client. Also added a Room::is_dm method and added some logic to use the new DM definitions in Client::get_dm_rooms and 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_rooms function to get an iterator with the DMs for the provided user id. (#6487)
  • Support the stable m.key_backup prefix for MSC4287: Sharing key backup preference between clients. (#6410)
  • Add new high-level search helpers in matrix_sdk_ui::search to 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-secrets feature. (#6432)
  • Add room_versions() & account_moderation() to HomeserverCapabilities. (#6413)
  • Enable sending redaction events through the send queue via RoomSendQueue::redact. This includes local echoes for redaction events through the new LocalEchoContent::Redaction variant. (#6250)
  • [breaking] Remove support for native-tls and remove all feature flags for selecting TLS backend, as rustls is the now the only supported TLS backend. (#6409)
  • [breaking] Added HomeserverCapabilities and Client::homeserver_capabilities() to get the capabilities of the homeserver. This replaces Client::get_capabilities(). (#6371)
  • [breaking] matrix_sdk::error::Error has a new variant Timeout which occurs when a cross-signing reset does not succeed after some period of time. (#6325)
  • The beacon_info start 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 EventCacheError is now Cloneable, which implied marking a few other error types as Cloneable, and wrapping a few other error variants with Arc. (#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::Event has a new field add_mentions which is passed forward in room::reply::make_reply_event. (#6270)
  • Add Recovery::recover_and_fix_backup to 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::SecureChannel for secure channel errors (#6141
  • Add QRCodeGrantLoginError::UnexpectedMessage for protocol message errors (#6141
  • Add QRCodeGrantLoginError::LoginFailure for login failure errors received from the other device (#6141
  • Add QRCodeGrantLoginError::DeviceNotFound for when the requested device was not returned by the homeserver (#6141
  • Add Client::subscribe_to_duplicate_key_upload_errors for listening to duplicate key upload errors from /keys/upload. (#6135)
  • Add Room::pin_event and Room::unpin_event, which allow pinning and unpinning events from a room. These were extracted from the matrix_sdk_ui crate, with no changes in functionality. (#6106)
  • LatestEventValue::RemoteInvite is added to handle a Latest Event for invite room. (#6056)
  • Add Room::set_own_member_display_name to set the current user's display name within only the one single room (can be used for /myroomnick functionality). (#5981)
  • Sending MessageLike and RawMessageLike events through a Room now returns the used EncryptionInfo, if any. (#5936)
  • [breaking]: The new Latest Event API replaces the old API. All the new_ prefixes have been removed, thus Room::new_latest_event becomes and overwrites the Room::latest_event value. The new Latest Event values stored in RoomInfo are 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, and LatestEvent (replaced by LatestEventValue). See the documentation of matrix_sdk::latest_event to learn about the new API. (#5624)
  • Expose a new method RoomEventCache::find_event_relations for loading events relating to a specific event ID from the cache. (#5930)
  • Replace in-memory stores with IndexedDB implementations when initializing Client with BuilderStoreConfig::IndexedDb. (#5946)
  • Call: Add support for the new Intents for voice only calls Intent.StartCallDmVoice and Intent.JoinExistingDmVoice. (#6003)
  • Add SlidingSync::unsubscribe_to_rooms and SlidingSync::clear_and_subscribe_to_rooms. (#6012)
  • [breaking] Sliding Sync has a new PollTimeout type, used by SlidingSyncBuilder::requires_timeout. (#6005)
  • Inviting a user to a room with Client::enable_share_history_on_invite set 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] LiveLocationShares has been renamed to LiveLocationsObserver and Room::live_location_shares to Room::live_locations_observer. (#6446)
  • Room::observe_live_location_shares has been replaced by Room::live_locations_observer. The new API returns a LiveLocationsObserver struct with a subscribe() method that provides an initial snapshot (Vector<LiveLocationShare>) and a batched stream of VectorDiff updates, instead of emitting individual LiveLocationShare items as beacon events arrive. The initial snapshot is loaded from the event cache on creation, includes the own user's sh...
Read more

matrix-sdk 0.16.1

08 May 14:07
matrix-sdk-0.16.1

Choose a tag to compare

What's Changed

Bugfix

  • Add a recursion limit attribute that raises it from the default value of 128 to 256. (#6489)
  • Reject invalid edits as candidates for the latest event. (#6454)
  • Check the user ID in the sender_device_keys property of Olm-encrypted
    to-device events. (#6553)

matrix-sdk 0.16.0

04 Dec 10:02
matrix-sdk-0.16.0

Choose a tag to compare

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::NotFound for non-existing / expired rendezvous sessions
    (#5898)
  • Add QRCodeGrantLoginError::NotFound for 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.child on
    room::power_levels::RoomPowerLevelChanges.
    (#5857)
  • Add the Client::server_versions_cached() method.
    (#5853)
  • Extend authentication::oauth::OAuth::grant_login_with_qr_code to 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-crypto re-export.
    (#5769)
  • Allow Client::get_dm_room() to be called without the e2e-encryption crate feature.
    (#5787)
  • [breaking] Add encryption::secret_storage::SecretStorageError::ImportError to indicate
    an error that occurred when importing a secret from secret storage.
    (#5647)
  • [breaking] Add authentication::oauth::qrcode::login::LoginProgress::SyncingSecrets to
    indicate that secrets are being synced between the two devices.
    (#5760)
  • Add authentication::oauth::OAuth::grant_login_with_qr_code to reciprocate a login by
    generating a QR code on the existing device.
    (#5801)
  • [breaking] OAuth::login_with_qr_code now returns a builder that allows performing the flow with either the
    current device scanning or generating the QR code. Additionally, new errors SecureChannelError::CannotReceiveCheckCode
    and QRCodeLoginError::ServerReset were added.
    (#5711)
  • [breaking] ThreadedEventsLoader::new now takes optional tokens parameter to customise where the pagination
    begins (#5678.
  • Make PaginationTokens pub, as well as its previous and next tokens so they can be assigned from other files
    (#5678.
  • Add new API to decline calls (MSC4310): Room::make_decline_call_event and Room::subscribe_to_call_decline_events
    (#5614)

Refactor

  • [breaking]: Client::server_vendor_info() requires to enable the
    federation-api feature.
    (#5912)

  • [breaking]: Client::reset_server_info() has been split into
    reset_supported_versions() and reset_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 the HttpError::NotClientRequest error in favor of a
    compile-time error.
    (#5781,
    #5789,
    #5815)

  • [breaking]: The waveform field was moved from AttachmentInfo::Voice to BaseAudioInfo,
    allowing to set it for any audio message. Its format also changed, and it is now a list of f32
    between 0 and 1.
    (#5732)

  • [breaking] The caption and formatted_caption fields and methods of AttachmentConfig,
    GalleryConfig and GalleryItemInfo have 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::EstablishingSecureChannel generic in order to reuse it
    for the currently missing QR login flow.
    (#5750)

  • [breaking] The new_virtual_element_call_widget now uses a props and a config parameter instead of only props.
    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 LatestEventValue was always created as LocalIsSending. It
    must be created as LocalCannotBeSent if a previous local LatestEventValue
    exists and is LocalCannotBeSent.
    (#5908)
  • Switch QR login implementation from std::time::Instant to ruma::time::Instant which
    is compatible with Wasm.
    (#5889)

matrix-sdk-base 0.14.1

10 Sep 09:36
matrix-sdk-base-0.14.1

Choose a tag to compare

What's Changed

Security Fixes

matrix-sdk 0.14.0

04 Sep 15:03
matrix-sdk-0.14.0

Choose a tag to compare

What's Changed

Features

  • Client::fetch_thread_subscriptions implements 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_rooms method that allows retrieving the list of joined spaces.

  • Room::enable_encryption and Room::enable_encryption_with_state_event_encryption will 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_state to enable E2E encryption with encrypted state event support, gated behind the experimental-encrypted-state-events feature.
    (#5557)

  • Add ignore_timeout_on_first_sync to the SyncSettings, which should allow to have a quicker first response when using one of the sync, sync_with_callback, sync_with_result_callback or sync_stream methods on Client, if the response is empty.
    (#5481)

  • The methods to use the /v3/sync endpoint set the use_state_after field, 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() and Room::unsubscribe_thread() methods.
    (#5439)

  • [breaking] RoomMemberRole has a new Creator variant, that differentiates room creators with infinite power levels, as introduced in room version 12.
    (#5436)

  • Add Account::fetch_account_data_static to fetch account data from the server with a statically-known type, with a signature similar to Account::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::login now allows requesting additional scopes for the authorization code grant.
    (#5395)

Refactor

  • [breaking] Upgrade ruma to 0.13.0
    (#5623)
  • [breaking] SyncSettings token is now SyncToken enum type which has default behaviour of SyncToken::ReusePrevious token. This breaks Client::sync_once. For old behaviour, set the token to SyncToken::NoToken with the usual SyncSettings::token setter.
  • [breaking] Change the upload_encrypted_file and make it clone the client instead of owning it. The lifetime of the UploadEncryptedFile request returned by Client::upload_encrypted_file() only depends on the request lifetime now.
  • [breaking] Add an IsPrefix = False bound to the account_data() and fetch_account_data_static() methods of Account. 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() and fetch_account_data() respectively can be used instead for event types with a variable suffix.
    (#5444)
  • [breaking] RoomMemberRole::suggested_role_for_power_level() and RoomMemberRole::suggested_power_level() now use UserPowerLevel to represent power levels instead of i64 to differentiate the infinite power level of creators, as introduced in room version 12.
    (#5436)
  • [breaking] The reason argument of Room::report_room() is now required, due to a clarification in the spec.
    (#5337)
  • [breaking] The join_rule field of RoomPreview is now a JoinRuleSummary. It has the same variants as SpaceRoomJoinRule but 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_notification and Room::send_call_notification_if_needed have been removed, since the event type they send is outdated, and Client is 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_timeout of 60s, which means they'll disconnect if the connection stalls.
    RequestConfig::timeout is 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

10 Jul 13:29
matrix-sdk-0.13.0

Choose a tag to compare

What's Changed

Security Fixes

Bug fixes

  • When joining a room via Client::join_room_by_id(), if the client has enable_share_history_on_invite enabled,
    we will correctly check for received room key bundles. Previously this was only done when calling Room::join.
    (#5043)

Features

  • Add Client::supported_versions(), which returns the results of both Client::server_versions() and
    Client::unstable_features() with a single call.
    (#5357)
  • WidgetDriver::send_to_device Now supports sending encrypted to-device messages.
    (#5252)
  • Client::add_event_handler: Set Option<EncryptionInfo> in EventHandlerData for to-device messages.
    If the to-device message was encrypted, the EncryptionInfo will be set. If it is None the message was sent in clear.
    (#5099)
  • EventCache::subscribe_to_room_generic_updates is 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 header url parameter
    instead of the now deprecated hideHeader parameter. This is only compatible with EC v0.13.0 or newer.
  • [breaking] RoomEventCacheGenericUpdate gains a new Clear variant, and sees
    its TimelineUpdated variant being renamed to UpdateTimeline.
    (#5363)

Refactor

  • [breaking]: Client::unstable_features() returns a BTreeSet<FeatureFlag>, containing only
    the features whose value was set to true in the response to the /versions endpoint.
    (#5357)
  • ClientServerCapabilities has been renamed to ClientServerInfo. Alongside this,
    Client::reset_server_info is now Client::reset_server_info and Client::fetch_server_capabilities
    is now Client::fetch_server_versions, returning the server versions response directly.
    (#5167)
  • RoomEventCacheListener is renamed RoomEventCacheSubscriber
    (#5269)
  • RoomPreview::join_rule is now optional, and will be set to None if the join rule state event
    is missing for a given room.
    (#5278)

Bug fixes

  • m.room.avatar has 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

10 Jun 11:06

Choose a tag to compare

What's Changed

Security Fixes

Bug Fixes

  • Remove a wildcard enum variant import which breaks compilation if used with tracing-attributes version 0.1.29. This is a workaround for a bug in tracing-attributes.
    (#5190) (#5191) (#5193)

matrix-sdk-crypto 0.11.1

10 Jun 10:44
matrix-sdk-crypto-0.11.1

Choose a tag to compare

What's Changed

Security Fixes

Bug Fixes

  • Remove a wildcard enum variant import which breaks compilation if used with tracing-attributes version 0.1.29. This is a workaround for a bug in tracing-attributes.
    (#5190) (#5191) (#5193)

matrix-sdk 0.12.0

10 Jun 11:46
matrix-sdk-0.12.0

Choose a tag to compare

What's Changed

Security Fixes

Features

  • Client::send_call_notification_if_needed now returns Result<bool> instead of Result<()> so we can check if
    the event was sent.
  • Added SendMediaUploadRequest wrapper for SendRequest, which checks the size of the request to
    upload making sure it doesn't exceed the m.upload.size value that can be fetched through
    Client::load_or_fetch_max_upload_size.
  • Add ClientBuilder::with_enable_share_history_on_invite to 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 stable m.marked_unread room account data, which was
    stabilized in Matrix 1.12. Room::is_marked_unread() also ignores the unstable
    com.famedly.marked_unread room 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-device flag, as it remains under active development and may undergo changes.
    (4998)
  • Room::send_single_receipt() and Room::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_gallery has been added to allow sending MSC4274-style media galleries
    via the send queue under the unstable-msc4274 feature.
    (#4977)

Bug fixes

  • A invited DM room joined with Client::join_room_by_id() or Client::join_room_by_id_or_alias()
    will now be correctly marked as a DM.
    (#5043)
  • API responses with an HTTP status code 520 won'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 into Room::push_condition_room_ctx(). The newer
    Room::push_context now returns a matrix_sdk::Room::PushContext, which can be used to compute
    the push actions for any event.
    (#4962)
  • Room::decrypt_event() now requires an extra matrix_sdk::Room::PushContext parameter to
    compute the push notifications for the decrypted event.
    (#4962)
  • SlidingSyncRoom has been removed. With it, the SlidingSync::get_room,
    get_all_rooms, get_rooms, get_number_of_rooms, and
    FrozenSlidingSync methods 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)