Skip to content

Releases: matrix-org/matrix-rust-sdk

matrix-sdk 0.11.0

11 Apr 09:32
matrix-sdk-0.11.0
1e938df
Compare
Choose a tag to compare

What's Changed

Features

  • Room::load_or_fetch_event() is a new method that will find an event in the event cache (if
    enabled), or using network like Room::event() does.
    (#4837)

  • [breaking]: The element call widget URL configuration struct
    (VirtualElementCallWidgetOptions) and URL generation have changed.

    • It supports the new fields: hide_screensharing, posthog_api_host, posthog_api_key,
      rageshake_submit_url, sentry_dsn, sentry_environment.
    • The widget URL will no longer automatically add /room to the base domain. For backward compatibility
      the app itself would need to add /room to the element_call_url.
    • And replaced:
      • analytics_id -> posthog_user_id (The widget URL query parameters will
        include analytics_id & posthog_user_id for backward compatibility)
      • skip_lobby -> intent (Intent.StartCall, Intent.JoinExisting.
        The widget URL query parameters will include skip_lobby if intent is
        Intent.StartCall for backward compatibility)
    • VirtualElementCallWidgetOptions now implements Default.
      (#4822)
  • [breaking]: The RoomPagination::run_backwards method has been removed and replaced by two
    simpler methods:

    • RoomPagination::run_backwards_until(), which will retrigger back-paginations until a certain
      number of events have been received (and retry if the timeline has been reset in the background).
    • RoomPagination::run_backwards_once(), which will run a single back-pagination (and retry if
      the timeline has been reset in the background).
      (#4689)
  • [breaking]: The OAuth::account_management_url method now caches the
    result of a call, subsequent calls to the method will not contact the server
    for a while, instead the cached URI will be returned. If caching of this URI
    is not desirable, the OAuth::fetch_account_management_url method can be used.
    (#4663)

  • The MediaRetentionPolicy can now trigger regular cleanups with its new
    cleanup_frequency setting.
    (#4603)

  • [breaking] The HTTP client only allows TLS 1.2 or newer, as recommended by
    BCP 195.
    (#4647)

  • Add Room::report_room api. (#4713)

  • Client::notification_client will create a copy of the existing Client,
    but now it'll make sure it doesn't handle any verification events to
    avoid an issue with these events being received and processed twice if
    NotificationProcessSetup was SingleSetup.

  • [breaking] Room::is_encrypted is replaced by
    Room::latest_encryption_state which returns a value of the new
    EncryptionState enum; another Room::encryption_state non-async and
    infallible method is added to get the EncryptionState without calling
    Room::request_encryption_state. This latter method is also now public.
    (#4777). One can
    safely replace:

    room.is_encrypted().await?

    by

    room.latest_encryption_state().await?.is_encrypted()
  • LocalServerBuilder, behind the local-server feature, can be used to spawn
    a server when the end-user needs to be redirected to an address on localhost.
    It was used for SsoLoginBuilder and can now be used in other cases, like for
    login with the OAuth 2.0 API.
    (#4804)

  • The OAuth api is no longer gated behind the experimental-oidc cargo
    feature.
    (#4830)

  • Re-export SqliteStoreConfig and add
    ClientBuilder::sqlite_store_with_config_and_cache_path to configure the
    SQLite store with the new SqliteStoreConfig structure
    (#4870)

  • Add Client::logout() that allows to log out regardless of the AuthApi that
    is used for the session.
    (#4886)

Bug Fixes

  • Ensure all known secrets are removed from secret storage when invoking the
    Recovery::disable() method. While the server is not guaranteed to delete
    these secrets, making an attempt to remove them is considered good practice.
    Note that all secrets are uploaded to the server in an encrypted form.
    (#4629)
  • Most of the features in the OAuth API should now work under WASM
    (#4830)

Refactor

  • [breaking] Switched from the unmaintained backoff crate to the backon
    crate. As part of this change, the RequestConfig::retry_limit method was
    renamed to RequestConfig::max_retry_time and the parameter for the method was
    updated from a u64 to a usize.
    (#4916)
  • [breaking] We now require Rust 1.85 as the minimum supported Rust version to compile.
    Yay for async closures!
    (#4745)
  • [breaking] The server_url and server_response methods of
    SsoLoginBuilder are replaced by server_builder(), which allows more
    fine-grained settings for the server.
    (#4804
  • [breaking]: OidcSessionTokens and MatrixSessionTokens have been merged
    into SessionTokens. Methods to get and watch session tokens are now
    available directly on Client.
    (MatrixAuth/Oidc)::session_tokens_stream(), can be replaced by
    Client::subscribe_to_session_changes() and then calling
    Client::session_tokens() on a SessionChange::TokenRefreshed.
    (#4772)
  • [breaking] Oidc::url_for_oidc() doesn't take the VerifiedClientMetadata
    to register as an argument, the one in OidcRegistrations is used instead.
    However it now takes the redirect URI to use, instead of always using the
    first one in the client metadata.
    (#4771)
  • [breaking] The server_url and server_response methods of
    SsoLoginBuilder are replaced by server_builder(), which allows more
    fine-grained settings for the server.
  • [breaking]: Rename the Oidc API to OAuth, since it's using almost
    exclusively OAuth 2.0 rather than OpenID Connect.
    (#4805)
    • The oidc module was renamed to oauth.
    • Client::oidc() was renamed to Client::oauth() and the AuthApi::Oidc
      variant was renamed to AuthApi::OAuth.
    • OidcSession was renamed to OAuthSession and the AuthSession::Oidc
      variant was renamed to AuthSession::OAuth.
    • OidcAuthCodeUrlBuilder and OidcAuthorizationData were renamed to
      OAuthAuthCodeUrlBuilder and OAuthAuthorizationData.
    • OidcError was renamed to OAuthError and the RefreshTokenError::Oidc
      variant was renamed to RefreshTokenError::OAuth.
    • Oidc::provider_metadata() was renamed to OAuth::server_metadata().
  • [breaking]: OAuth::finish_login() must always be called, instead of OAuth::finish_authorization()
    (#4817)
    • OAuth::abort_authorization() was renamed to OAuth::abort_login().
    • OAuth::finish_login() can be called several times for the same session,
      but it will return an error if it is called with a new session.
    • OAuthError::MissingDeviceId was removed, it cannot occur anymore.
  • [breaking] OidcRegistrations was renamed to OAuthRegistrationStore.
    (#4814)
    • OidcRegistrationsError was renamed to OAuthRegistrationStoreError.
    • The registrations module was renamed and is now private.
      OAuthRegistrationStore and ClientId are exported from oauth, and
      OAuthRegistrationStoreError is exported from oauth::error.
    • All the methods of OAuthRegistrationStore are now async and return a
      Result: errors when reading the file are no longer ignored, and blocking
      I/O is performed in a separate thread.
    • OAuthRegistrationStore::new() takes a PathBuf instead of a Path.
    • OAuthRegistrationStore::new() no longer takes a static_registrations
      parameter. It should be provided if needed with
      OAuthRegistrationStore::with_static_registrations().
  • [breaking] Allow to use any registration method with OAuth::login() and
    OAuth::login_with_qr_code().
    (#4827)
    • OAuth::login takes an optional ClientRegistrationData to be able to
      register and login with a single function call.
    • OAuth::url_for_oidc() was removed, it can be replaced by a call to
      OAuth::login().
    • OAuth::login_with_qr_code() takes an optional ClientRegistrationData
      instead of the client metadata.
    • OAuth::finish_login takes a UrlOrQuery instead of an
      AuthorizationCode. The deserialization of the query string will occur
      inside the method and eventual errors will be handled.
    • OAuth::login_with_oidc_callback() was removed, it can be replaced by a
      call to OAuth::finish_login().
    • AuthorizationResponse, AuthorizationCode and AuthorizationError are
      now private.
  • [**break...
Read more

matrix-sdk 0.10.0

04 Feb 15:45
matrix-sdk-0.10.0
Compare
Choose a tag to compare

What's Changed

Features

  • Allow to set and check whether an image is animated via its ImageInfo.
    (#4503)
  • Implement Default for BaseImageInfo, BaseVideoInfo, BaseAudioInfo and
    BaseFileInfo.
    (#4503)
  • Expose Client::server_versions() publicly to allow users of the library to
    get the versions of Matrix supported by the homeserver.
    (#4519)
  • Create RoomPrivacySettings helper to group room settings functionality
    related to room access and visibility.
    (#4401)
  • Enable HTTP/2 support in the HTTP client.
    (#4566)
  • The media contents stored in the media cache can now be controlled with a
    MediaRetentionPolicy and the new Media methods media_retention_policy(),
    set_media_retention_policy(), clean_up_media_cache().
    (#4571)

Refactor

  • [breaking]: The reexported types SyncTimelineEvent and TimelineEvent have been fused into a single type TimelineEvent, and its field push_actions has been made Optional (it is set to None when we couldn't compute the push actions, because we lacked some information).
    (#4568)
  • [breaking] Move the optional RequestConfig argument of the
    Client::send() method to the with_request_config() builder method. You
    should call Client::send(request).with_request_config(request_config).await
    now instead.
    (#4443)
  • [breaking] Remove the AttachmentConfig::with_thumbnail() constructor and
    replace it with the AttachmentConfig::thumbnail() builder method. You should
    call AttachmentConfig::new().thumbnail(thumbnail) now instead.
    (#4452)
  • [breaking] Room::send_attachment() and RoomSendQueue::send_attachment()
    now take any type that implements Into<String> for the filename.
    (#4451)
  • [breaking] Recovery::are_we_the_last_man_standing() has been renamed to is_last_device().
    (#4522)
  • [breaking] The matrix_auth module is now at authentication::matrix.
    (#4575)
  • [breaking] The oidc module is now at authentication::oidc.
    (#4575)

matrix-sdk 0.9.0

18 Dec 14:37
matrix-sdk-0.9.0
Compare
Choose a tag to compare

What's Changed

Bug Fixes

  • Use the inviter's server name and the server name from the room alias as
    fallback values for the via parameter when requesting the room summary from
    the homeserver. This ensures requests succeed even when the room being
    previewed is hosted on a federated server.
    (#4357)

  • Do not use the encrypted original file's content type as the encrypted
    thumbnail's content type.
    (#ecf4434)

Features

  • Enable persistent storage for the EventCache. This allows events received
    through the /sync endpoint or backpagination to be stored persistently,
    enabling client applications to restore a room's view, including events,
    without requiring server communication.
    (#4347)

  • [BREAKING] Make all fields of Thumbnail required
    (#4324)

  • Backups::exists_on_server, which always fetches up-to-date information from the
    server about whether a key storage backup exists, was renamed to
    fetch_exists_on_the_server, and a new implementation of exists_on_server
    which caches the most recent answer is now provided.

matrix-sdk 0.8.0

19 Nov 15:46
matrix-sdk-0.8.0
0b16d48
Compare
Choose a tag to compare

What's Changed

Bug Fixes

  • Add more invalid characters for room aliases.

  • 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
    BackupDownloadStrategy::AfterDecryptionFailure, where no attempt would be
    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.

// Get an observer.
let observer =
    client.observe_events::<SyncRoomMessageEvent, (Room, Vec<Action>)>();

// 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<Action>), 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)

  • 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)

  • 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.

matrix-sdk-crypto-ffi-0.4.3

12 Sep 12:58
Compare
Choose a tag to compare

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

  • Exposed PKEncryption APIs directly from vodozemac

matrix-sdk-crypto 0.7.2

18 Jul 15:15
0.7.2-crypto
Compare
Choose a tag to compare

What's Changed

Security Fixes

matrix-sdk-crypto-ffi-0.4.2

28 May 14:12
eddaf96
Compare
Choose a tag to compare

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

Changes:

FFI Bindings: Expose CryptoStore clear caches

matrix-sdk-crypto-ffi-0.4.1

22 May 15:00
fa55445
Compare
Choose a tag to compare

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

Contains some breaking changes

matrix-sdk-crypto-ffi-0.3.13

02 Oct 10:13
2f97301
Compare
Choose a tag to compare

matrix-sdk-crypto-ffi-0.3.12

11 Aug 10:12
364a4ae
Compare
Choose a tag to compare