Commit Graph

15177 Commits

Author SHA1 Message Date
Michael Goldenberg
7eefcfb72e feat(base): add state store wrapper providing synchronized calls to save_changes
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-05-06 16:26:14 +02:00
Benjamin Bouvier
d0cb6648ec fix(event cache): don't deadlock when event-focused cache and redecryption are invoked
The following ABBA situation would happen before this fix:

- an event-focused cache starts pagination (holding onto the
event-focused inner lock), and then takes the event cache room state
lock (while saving the events it's received in the pagination).
- redecryption takes the event cache room state lock, to update internal
room events; then it would try to go through all the event-focused
caches to replace their UTDs (thus taking all the inner locks, in turn).

So, having an event-focused cache paginating while the redecryption
happens would cause a deadlock. The fix consists in changing the order
of operations when re-decrypting: instead of holding onto the event
cache room state lock all the time, first perform all the replacements
necessary in the room cache, *and* clone the event-focused /
pinned-event locks; then, replace UTDs in those (after the event cache
room state lock has been released).
matrix-sdk-ffi/20260506
2026-05-06 10:58:54 +02:00
Mauro Romito
30bb6048ee docs: changelog update. 2026-05-06 10:38:58 +02:00
Mauro Romito
e673f85a82 feature (bindings): expose beacon and beacon_info power levels on the FFI 2026-05-06 10:38:58 +02:00
Kévin Commaille
9909becdd0 fix(sdk): Ignore errors during m.oauth UIAA stage
To keep polling until the stage is completed or the identity reset is
cancelled.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-06 10:33:13 +02:00
Kévin Commaille
f5ed67a7c3 Add changelog entry
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-06 10:33:13 +02:00
Kévin Commaille
7303ae3bfa fix(examples): Provide m.oauth auth data when resetting cross-signing keys
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-06 10:33:13 +02:00
Kévin Commaille
2b534fb471 test(sdk): Update m.oauth UIAA integration test to use session key
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-06 10:33:13 +02:00
Kévin Commaille
a13badbf62 fix(sdk): Expose session key in OAuthCrossSigningResetInfo
This allows to provide `AuthData::OAuth` in
`CrossSigningResetHandle::auth()`, to match the behavior expected
according to the Matrix spec.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-06 10:33:13 +02:00
dependabot[bot]
2a70763951 chore(deps): bump taiki-e/install-action from 2.75.18 to 2.75.23
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.75.18 to 2.75.23.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](055f5df8c3...481c34c1cf)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.75.23
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-06 10:10:30 +02:00
Daniel Salinas
65cdd9d9a0 Conditionalize search behind experimental-search feature flag
Move search module and SearchIndexStoreKind usage behind
#[cfg(feature = "experimental-search")] so builds without the
feature don't pull in search dependencies.
2026-05-06 09:19:35 +02:00
Richard van der Hoff
2ec031b819 Bindings: re-run build scripts if NDK changes location (#6538)
The build scripts for the FFI bindings embed the path to the Android NDK
in the target directory, so if the NDK changes location, we need to
re-run the build scripts to avoid a linker error.
2026-05-05 12:04:47 +00:00
dependabot[bot]
750024867a chore(deps): bump crate-ci/typos from 1.45.1 to 1.45.2
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.45.1 to 1.45.2.
- [Release notes](https://github.com/crate-ci/typos/releases)
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md)
- [Commits](cf5f1c29a8...7c57295821)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.45.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 13:51:16 +02:00
Jorge Martín
8b13e4811d docs: Add changelog entry 2026-05-05 12:12:14 +02:00
Jorge Martín
647abfe0c4 fix(sdk-base): Filter out service members from room heroes
The spec says the HS *should not* return service members in the heroes, but some HS implementations still have this behavior, which can lead to the service member being treated as an important user in the room.
2026-05-05 12:12:14 +02:00
Jorge Martín
ae475413fa docs: Add changelog entries 2026-05-05 12:09:51 +02:00
Jorge Martín
7bc1dad70e feat(ffi): Expose RoomMember::is_service_member 2026-05-05 12:09:51 +02:00
Jorge Martín
2629431c90 feat(sdk-base): Add RoomMember::is_service_member
This will help clients filter out room members which are service members easily, without having to manually load and check the room info separately.
2026-05-05 12:09:51 +02:00
dependabot[bot]
94686fffd5 chore(deps): bump CodSpeedHQ/action from 4.13.1 to 4.14.0
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.13.1 to 4.14.0.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](db35df748d...658a901452)

---
updated-dependencies:
- dependency-name: CodSpeedHQ/action
  dependency-version: 4.14.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-05 13:03:09 +03:00
Valere Fedronic
4e8ceaac82 refactor(sdk-ui): remove expect() with better borrow (#6513)
<!-- description of the changes in this PR -->

Follow up on review on this PR
https://github.com/matrix-org/matrix-rust-sdk/pull/6494#discussion_r3146315397

Remove the usage of if/expect that was introduced because of a borrowing
problem.
Instead we use `ok_or_else`, but we clone the debug_string early (to
avoid needing to borrow event again in the `ok_or_else`), it is not
ideal either but better that the expect/panic

I also removed the `is_rtc_notification` and `is_live_location` that was
created I believe just to avoid the borrowing problem? They were only
used in test and it just a shortcut for `matches!()`

- [ ] I've documented the public API Changes in the appropriate
`CHANGELOG.md` files.
- [ ] This PR was made with the help of AI.

<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by:
2026-05-01 11:40:15 +02:00
Jorge Martín
8a0dcdd550 doc: Add changelogs 2026-04-30 17:04:39 +02:00
Jorge Martín
8d3c76ac6e test: Add some extra tests for checking Room::is_dm 2026-04-30 17:04:39 +02:00
Jorge Martín
547a0ea114 feat(ffi): Add RoomInfo::is_dm field
With this, the clients won't have to manually check on their side if a room is a DM or not
2026-04-30 17:04:39 +02:00
Jorge Martín
02f9f7a26c refactor(sdk): Use Room::is_dm instead of Room::is_direct for global room search too 2026-04-30 17:04:39 +02:00
Jorge Martín
44621a4d4b bench: Fix benchmark 2026-04-30 17:04:39 +02:00
Jorge Martín
9190666691 feat: Add Room::is_dm function
This function will return whether the room is a DM or not based on the definition used by the client
2026-04-30 17:04:39 +02:00
Jorge Martín
e3fc083584 refactor(sdk): Client::get_dm_rooms results will also depend on the DmRoomDefinition enum case 2026-04-30 17:04:39 +02:00
Jorge Martín
503021e559 refactor(sdk-ui): Apply different logic for the People room list filter based on the selected enum case
- `MatrixSpec` will keep the current behaviour, checking if the room is direct and has a single target.
- `TwoMembers` will also try to check there are at most 2 non-service members in the room.
2026-04-30 17:04:39 +02:00
Jorge Martín
05b3d7a554 refactor: Use DmRoomDefinition in clients and builders.
To keep compatibility intact, the `MatrixSpec` case is used by default
2026-04-30 17:04:39 +02:00
Jorge Martín
872dafb599 feat(sdk-base): Add DmRoomDefinition enum
This enum controls what being a DM means for the client
2026-04-30 17:04:39 +02:00
Jorge Martín
e90dbb37c8 fix: Filter out threaded events from event focused timeline 2026-04-29 12:12:51 +02:00
Mauro Romito
1136eb4698 change: set a higher retry limit for send location beacon 2026-04-28 17:44:33 +03:00
Hugh Nimmo-Smith
b31e0f0131 Expose HumanQrGrantLoginError::Unknown reason in error message 2026-04-28 16:04:29 +02:00
Kévin Commaille
df5f5a8e2b test(sdk): Test that OAuth::server_metadata uses the refresh lock
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
adc0caa7d3 Add PR links to changelog entries
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
1bc592025a refactor(common): Rename ttl_cache module to ttl
Since it doesn't contain the TtlCache anymore.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
ad3ed7e530 refactor(sdk): Always use refresh lock for OAuth 2.0 server metadata
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
b695973d6f refactor(sdk): Make Cache generic over the error type
For cases where the error doesn't need to be propagated.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
489d7195bb refactor(common): Remove TtlCache
It is now unused.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
53ffa347e4 refactor(sdk): Use Cache instead of TtlCache for OAuth 2.0 server metadata
We also cache the data every time that `OAuth::server_metadata()` is
called, in the hope of avoiding some requests with
`OAuth::cached_server_metadata()`.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 15:43:20 +02:00
Kévin Commaille
6777907f28 Upgrade Ruma
Use the new release.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-28 10:45:22 +03:00
dependabot[bot]
f2bdb7c8b7 chore(deps): bump taiki-e/install-action from 2.75.10 to 2.75.18
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.75.10 to 2.75.18.
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](85b24a67ef...055f5df8c3)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.75.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-28 09:44:21 +02:00
dependabot[bot]
77baf25b4b chore(deps): bump tj-actions/changed-files from 47.0.5 to 47.0.6
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 47.0.5 to 47.0.6.
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](22103cc46b...9426d40962)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 47.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-28 09:31:36 +02:00
dependabot[bot]
84d2e61190 chore(deps): bump zizmorcore/zizmor-action from 0.5.2 to 0.5.3
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.5.2 to 0.5.3.
- [Commits](71321a20a9...b1d7e1fb5d)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-28 09:30:42 +02:00
dependabot[bot]
5c17acd75e chore(deps): bump EmbarkStudios/cargo-deny-action from 2.0.15 to 2.0.17
Bumps [EmbarkStudios/cargo-deny-action](https://github.com/embarkstudios/cargo-deny-action) from 2.0.15 to 2.0.17.
- [Commits](3fd3802e88...91bf2b620e)

---
updated-dependencies:
- dependency-name: EmbarkStudios/cargo-deny-action
  dependency-version: 2.0.17
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-28 09:30:03 +02:00
dependabot[bot]
3ac1f0645a chore(deps): bump actions/setup-node from 6.3.0 to 6.4.0
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.3.0 to 6.4.0.
- [Commits](53b83947a5...48b55a011b)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-28 08:29:55 +03:00
Valere Fedronic
9266b89a0f feat(sdk-ui): Aggregation of call declines on to the notification event (#6494) 2026-04-27 14:48:40 +02:00
Michael Goldenberg
b828ff8957 refactor(sdk): add logging for tracking olm machine's crypto store generation
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-04-27 12:44:28 +02:00
Doug
91bdb4c7bd chore: Add a changelog entry. 2026-04-27 12:31:37 +02:00
Doug
7f4a9c5ab4 ffi: Rename Encryption related OIDC types to OAuth. 2026-04-27 12:31:37 +02:00