15103 Commits

Author SHA1 Message Date
Michael Goldenberg 4e4b508c38 refactor(sdk): use consistent errors for client encryption store locks
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-03-31 17:34:11 +02:00
Michael Goldenberg 313e634996 refactor(sdk): clean up errors in client encryption
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-03-31 17:34:11 +02:00
Michael Goldenberg ae72fcf663 refactor(sdk): rely on dirtiness reported by crypto store's cross-process lock
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-03-31 17:34:11 +02:00
Michael Goldenberg 12e9a2a159 feat(common): expose generation in cross-process lock
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-03-31 17:34:11 +02:00
Damir Jelić 16c1b9b57f chore: Bump rand 2026-03-31 16:57:50 +02:00
Benjamin Bouvier 06e6dd05c3 chore(docs): publicly expose the AutomaticPagination API object for external users 2026-03-31 16:36:13 +02:00
Benjamin Bouvier 1cf84e203e chore(event cache): make clippy pass on automatic pagination 2026-03-31 15:57:36 +02:00
Benjamin Bouvier 9913cce946 Merge branch 'main' into bnjbvr/automatic-backpagination-unread-counts 2026-03-31 15:55:44 +02:00
Benjamin Bouvier 1ee88b176c refactor(event cache): create a standalone AutomaticPagination API object 2026-03-31 15:46:46 +02:00
Daniel Salinas f0193cc8ac Fix indexedb migration to clean up gaps + chunks properly 2026-03-31 15:37:36 +02:00
Jorge Martín 5d2eab119d feat: Improve getting homeserver capabilities
This extracts the `/capabilities` logic to its own `HomeserverCapabilities` component in the SDK that can be manually asked to fetch, cache locally and return these capabilities.
2026-03-31 15:25:37 +02:00
Benjamin Bouvier ca91b6a278 fix(event cache): handle read receipt after a duplicate-only sync response 2026-03-31 12:52:18 +02:00
Benjamin Bouvier 260fec8750 test(event cache): regression test for lack of unread count updates after a duplicate-only sync response 2026-03-31 12:52:18 +02:00
Benjamin Bouvier 950fcd289d refactor(ffi): only start with a reset diff if the timeline isn't empty 2026-03-31 11:17:34 +02:00
Bertin Philippe 2214aded9d feat(ffi): expose Client.sync() (#6359)
### Expose sync v2 API through FFI via `Client.sync()` and
`Client.sync_once()` #6348

Mobile clients can now sync using the traditional `/sync` v2 endpoint
through the FFI bindings, without requiring Sliding Sync (MSC4186)
support on the homeserver.

This PR introduces a new API (non-breaking change).

#### Implementation notes

I chose to expose only the **list of room IDs** (invited, joined, left,
knocked) in the `SyncResponse`, rather than forwarding the full per-room
event payloads. This keeps the FFI surface simple. Clients that need
room details can query them through the existing `Room` APIs after being
notified of changes via the listener.

Two entry points are provided:

- **`Client.sync(settings, listener)`** starts a continuous sync loop,
returning a `TaskHandle` for cancellation. The `SyncListener` callback
fires after each successful sync response.
- **`Client.sync_once(settings)`** performs a single sync call, useful
for initial sync or one-off use cases.

`SyncSettings` exposes `timeout_ms` and `full_state`.

Signed-off-by: Philippe Bertin <pbertin@teladochealth.com>
matrix-sdk-ffi/20260331
2026-03-31 10:40:54 +02:00
Doug 02c41e20ad chore: Remove uniffi Swift mocks workaround now that we're using 0.31.0. 2026-03-30 21:43:07 +02:00
dependabot[bot] 0e627b4ba2 chore(deps): bump actions/cache from 5.0.3 to 5.0.4
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/cdf6c1fa76f9f475f3d7449005a359c84ca0f306...668228422ae6a00e4ad889ee87cd7109ec5666a7)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 21:42:29 +02:00
dependabot[bot] 55d2e6a740 chore(deps): bump CodSpeedHQ/action from 4.11.1 to 4.12.1
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.11.1 to 4.12.1.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codspeedhq/action/compare/281164b0f014a4e7badd2c02cecad9b595b70537...1c8ae4843586d3ba879736b7f6b7b0c990757fab)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 21:42:01 +02:00
dependabot[bot] ee2ed6033e chore(deps): bump moonrepo/setup-rust from 1.2.2 to 1.3.0
Bumps [moonrepo/setup-rust](https://github.com/moonrepo/setup-rust) from 1.2.2 to 1.3.0.
- [Release notes](https://github.com/moonrepo/setup-rust/releases)
- [Changelog](https://github.com/moonrepo/setup-rust/blob/master/CHANGELOG.md)
- [Commits](https://github.com/moonrepo/setup-rust/compare/ede6de059f8046a5e236c94046823e2af11ca670...abb2d32350334249b178c401e5ec5836e0cd88d3)

---
updated-dependencies:
- dependency-name: moonrepo/setup-rust
  dependency-version: 1.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 21:41:36 +02:00
Damir Jelić fb97922a1c Revert "feat(sdk): Use stable OAuth 2.0 login scopes"
This reverts commit 14b21e2a9a.
2026-03-30 21:40:31 +02:00
dependabot[bot] 85b8c83d51 chore(deps): bump bnjbvr/cargo-machete from bf9b52599f213cb8a6d6cee568fc61a413c79975 to b81ce1560c5fbd0210cb66d88bf210329ff04266 (#6375)
Bumps [bnjbvr/cargo-machete](https://github.com/bnjbvr/cargo-machete)
from bf9b52599f213cb8a6d6cee568fc61a413c79975 to
b81ce1560c5fbd0210cb66d88bf210329ff04266.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bnjbvr/cargo-machete/blob/main/CHANGELOG.md">bnjbvr/cargo-machete's
changelog</a>.</em></p>
<blockquote>
<h1>unreleased</h1>
<ul>
<li>Improved: add <code>renamed</code> table to track renamed crates (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/152">#152</a>
<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/153">#153</a>).</li>
</ul>
<h1>0.7.0 (released on 2024-09-25)</h1>
<ul>
<li>Breaking change: Don't search in ignored files (those specified in
.ignore/.gitignore) by default. It's possible to use
<code>--no-ignore</code> to search in these directories by default (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/137">#137</a>).</li>
<li>Improved: fix false positives for multi dependencies single use
statements (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/120">#120</a>).
This improves precision at the cost of a small performance hit.</li>
<li>Improved: make usage of <code>--with-metadata</code> more accurate
(<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/122">#122</a>,
<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/132">#132</a>).</li>
<li>Improved: instead of displaying <code>.</code> for the current
directory, <code>cargo-machete</code> will now display <code>this
directory</code> (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/109">#109</a>).</li>
<li>Added: There's now an automated docker image build that publishes to
the <a
href="https://github.com/bnjbvr/cargo-machete/pkgs/container/cargo-machete">github
repository</a> (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/121">#121</a>).</li>
<li>Added: <code>--ignore</code> flag which make cargo-machete respect
.ignore and .gitignore files when searching for files (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/95">#95</a>).</li>
</ul>
<h1>0.6.2 (released on 2024-03-24)</h1>
<ul>
<li>Added: shorter display when scanning the current directory (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/109">#109</a>).</li>
<li>Fix: adapt to latest pkgid specification, so as not to crash with
<code>--with-metadata</code> (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/106">#106</a>).</li>
</ul>
<h1>0.6.1 (released on 2024-02-21)</h1>
<ul>
<li>Chore: bump major dependencies, to fix parsing issues of Cargo.toml
files (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/101">#101</a>,
<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/105">#105</a>).</li>
</ul>
<h1>0.6.0 (released on 2023-09-23)</h1>
<ul>
<li><em>Breaking</em>/improved: match against crate name
case-insensitive (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/69">#69</a>).</li>
<li>Added: Github action (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/85">#85</a>).
See README for documentation.</li>
<li>Added: support for ignored workspace dependencies (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/57">#57</a>,
<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/86">#86</a>).
See README for documentation.</li>
<li>Added: <code>--version</code> switch to print the version (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/66">#66</a>).</li>
<li>Fix: avoid searching for workspace Cargo.toml longer than needed (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/84">#84</a>).</li>
<li>Chore: better documentation and reporting (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/63">#63</a>,
<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/72">#72</a>,
<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/80">#80</a>).</li>
</ul>
<h1>0.5.0 (released on 2022-11-15)</h1>
<ul>
<li><em>Breaking</em>: Use <code>argh</code> for parsing. Now, paths of
directories to scan must be passed in the last
position, when running from the command line (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/51">#51</a>).</li>
<li>Fix rare false positive and speed up most common case (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/53">#53</a>).</li>
<li>Fix loading properties from workspace (<a
href="https://redirect.github.com/bnjbvr/cargo-machete/issues/54">#54</a>).</li>
</ul>
<h1>0.4.0 (released on 2022-10-16)</h1>
<ul>
<li>Added <code>--skip-target-dir</code> to not analyze
<code>target/</code> directories.</li>
<li>Added a message indicating of any unused dependencies were found or
not.</li>
<li>Support for workspace properties</li>
</ul>
<h1>0.3.1 (released on 2022-06-12)</h1>
<ul>
<li>Support empty global prefix, e.g. <code>use ::log;</code>.</li>
</ul>
<h1>0.3.0 (released on 2022-05-09)</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bnjbvr/cargo-machete/commit/b81ce1560c5fbd0210cb66d88bf210329ff04266"><code>b81ce15</code></a>
build(deps): bump argh from 0.1.18 to 0.1.19</li>
<li><a
href="https://github.com/bnjbvr/cargo-machete/commit/5675104e9dc2192adf3acec0535353003045d586"><code>5675104</code></a>
build(deps): bump toml_edit from 0.25.4+spec-1.1.0 to
0.25.5+spec-1.1.0</li>
<li>See full diff in <a
href="https://github.com/bnjbvr/cargo-machete/compare/bf9b52599f213cb8a6d6cee568fc61a413c79975...b81ce1560c5fbd0210cb66d88bf210329ff04266">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 16:26:07 +00:00
Michael Goldenberg 179f38b252 refactor(sdk): use default crypto provider in rustls
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-03-30 16:40:51 +02:00
Damir Jelić 2c6409cb86 Merge pull request #6235 from Hywan/feat-sdk-event-cache-log-error-to-sentry
chore(sdk): Log errors from `EventLinkedChunk`
2026-03-30 14:03:39 +02:00
JoFrost 4d2f8bb82c feat(base): improve profile updates for left/banned users (#6097)
This avoids profile updates when a user decides to leave on their own (in which case their profile is kept as is), and when a user is banned (in which case their profile is removed).

Signed-off-by: JoFrost <20685007+JoFrost@users.noreply.github.com>
2026-03-30 11:59:43 +02:00
Benjamin Bouvier c0b26b6f25 refactor(event cache): move the thread subscriber and search indexing tasks to the EventCacheDropHandles struct
This means that when some caller is subscribing to the `EventCache`,
even if the event cache drops in the background, the task will remain
active until the end of the subscriber.
2026-03-30 11:49:16 +02:00
Benjamin Bouvier 8f96c32d56 refactor(event cache): use abort_on_drop for the background task handle in EventCacheDropHandles
This avoids a few manual `abort()` call in a manual `Drop` impl.
2026-03-30 11:49:16 +02:00
Benjamin Bouvier bdd0162831 tests(event cache): make tests more resilient to the order of event cache updates 2026-03-30 11:40:19 +02:00
Benjamin Bouvier 752695c6ff chore: rename background request to automatic pagination request
And associated vocabulary and fields.
2026-03-30 11:28:05 +02:00
Benjamin Bouvier 552639763e chore: move the BackgroundRequest type, tests and task to its own file 2026-03-30 11:19:01 +02:00
Jorge Martín e65d4c44b4 fix(ffi): Replace libloading with jvm-getter for getting a JVM
The `libloading` approach only works on Android 12+
2026-03-30 11:17:58 +02:00
Benjamin Bouvier d151340882 chore(review): use an unbounded sender for BackgroundRequest 2026-03-30 11:12:39 +02:00
Benjamin Bouvier 27415dc64d chore(review): Use assert_matches and remove PartialEq/Eq impls for EventsOrigin 2026-03-30 11:04:41 +02:00
Benjamin Bouvier 4feeaf0cf5 chore(review): address first review comments 2026-03-30 11:01:57 +02:00
Benjamin Bouvier 87a2f8fab7 feat(multiverse): enable automatic back pagination in multiverse 2026-03-30 10:40:31 +02:00
Benjamin Bouvier 871cb2221b test(event cache): add an integration test for automatically paginating a room with missing receipts 2026-03-30 10:40:31 +02:00
Benjamin Bouvier d1d174d137 test(event cache): test the credit system of automatic pagination 2026-03-30 10:40:31 +02:00
Benjamin Bouvier bd7dca45ef feat(event cache): make some background pagination parameters configurable 2026-03-30 10:40:31 +02:00
Benjamin Bouvier 856b2be992 test(event cache): unit test automatic background pagination 2026-03-30 10:40:31 +02:00
Benjamin Bouvier 161750f6d0 refactor(event cache): add PartialEq to EventsOrigin 2026-03-30 10:40:31 +02:00
Benjamin Bouvier c4a95f9bbe feat(event cache): automatically request paginations when no receipt has been found when computing unread counts 2026-03-30 10:40:31 +02:00
Benjamin Bouvier ac5552807b refactor(event cache): have select_best_receipt return a result struct
This makes it simpler to test its expected behavior, and will make it
trivial to add a system to request automatic paginations in the
background.
2026-03-30 10:40:31 +02:00
Benjamin Bouvier ff8b27f99b feat(event cache): add an automatic background requests task 2026-03-30 10:40:31 +02:00
Benjamin Bouvier bf9ffd7d09 refactor(event cache): make EventCache::config/config_mut sync by using a sync lock
There wasn't good reason to use an async lock, as this lock is always
super short-lived, it can be sync, which avoids complications in the
subsequent commit when calling sync init code.
2026-03-30 10:40:31 +02:00
Benjamin Bouvier 9f18d76355 feat(event cache): add a feature toggle to enable automatic back-pagination 2026-03-30 10:40:30 +02:00
Andrew Ferrazzutti 83c6a7fdf4 Fix location & name of the built shared object 2026-03-30 10:31:07 +02:00
Andrew Ferrazzutti 67fbba1e87 Tweak suggested ANDROID_NDK path
- Remove redundant trailing slash
- Clarify what the version component may be
2026-03-30 10:31:07 +02:00
Andrew Ferrazzutti 9c66221830 Fix crypto-ffi build instructions in README
- Change the example config file to not make it appear as though it
  processes environment variables
- Remove the `ar` setting from the example config file, as that setting
  is deprecated and unused (see
  https://doc.rust-lang.org/cargo/reference/config.html#targettriplear)
- Replace references of `.cargo/config` to `.cargo/config.toml`, as the
  former is deprecated
- Add example of how to set the linker through an environment variable
- Add instruction to include the NDK binary tools directory to PATH,
  because builds may fail without it
  (see https://github.com/matrix-org/matrix-rust-sdk/issues/4042)
2026-03-30 10:31:07 +02:00
Philippe Bertin f00d09597c feat(ffi): expose Room.send_state_event_raw() for sending arbitrary state events
Closes #6349

Signed-off-by: Philippe Bertin <pbertin@teladochealth.com>
2026-03-30 10:27:00 +02:00
dependabot[bot] 339f4be49c chore(deps): bump bnjbvr/cargo-machete
Bumps [bnjbvr/cargo-machete](https://github.com/bnjbvr/cargo-machete) from 2e2703d664c176156a22936b9203c38cc7a273dd to bf9b52599f213cb8a6d6cee568fc61a413c79975.
- [Release notes](https://github.com/bnjbvr/cargo-machete/releases)
- [Changelog](https://github.com/bnjbvr/cargo-machete/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bnjbvr/cargo-machete/compare/2e2703d664c176156a22936b9203c38cc7a273dd...bf9b52599f213cb8a6d6cee568fc61a413c79975)

---
updated-dependencies:
- dependency-name: bnjbvr/cargo-machete
  dependency-version: bf9b52599f213cb8a6d6cee568fc61a413c79975
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 10:54:13 +03:00
dependabot[bot] f5e3e7db83 chore(deps): bump Swatinem/rust-cache from 2.9.0 to 2.9.1
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.9.0 to 2.9.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/c676846f29d98ff6b0106d3608c7ffd4048af17b...c19371144df3bb44fab255c43d04cbc2ab54d1c4)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.9.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 09:48:48 +02:00