429 Commits

Author SHA1 Message Date
Ivan Enderlin
f283a0aadf chore(sdk): Replace an Option<T> by OnceCell<T>. 2025-12-16 12:33:04 +01:00
Kévin Commaille
b0574c1c2c feat(sdk): Add support for the stable m.oauth UIAA type
By replacing the custom implementation with the one in Ruma.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-12-05 09:20:48 +01:00
Jorge Martín
031d8457b6 refactor: Upgrade uniffi to the latest upstream 2025-12-04 15:17:26 +01:00
Damir Jelić
4701faf039 chore: Release matrix-sdk version 0.16.0 2025-12-04 09:59:04 +01:00
Ivan Enderlin
e6094e6b07 chore: Use our own fork of indexed-db-futures.
This patch uses our own fork of `indexed-db-futures`: `matrix-indexed-db-futures`.
2025-12-03 11:59:50 +01:00
Damir Jelić
850b7dde6d chore: Release matrix-sdk version 0.15.0 2025-11-26 15:44:26 +01:00
Jorge Martín
813c5fc9f9 misc: Bump Sentry SDK to v0.46.0 2025-11-25 14:19:49 +01:00
Damir Jelić
2f7d2b3b9b chore: Bump our sentry-tracing deps 2025-11-21 17:00:44 +01:00
Damir Jelić
5b396d0b0d chore: Add a link to the github issue for why async-stream isn't bumped 2025-11-21 14:18:22 +01:00
Damir Jelić
127154fcfa chore: Bump our deps and update the Cargo.lock file 2025-11-21 14:18:22 +01:00
Kévin Commaille
1352bd74d6 Upgrade Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-11-20 16:44:54 +00:00
Andy Balaam
ca436016b4 base: Bump ruma to 91424b1fc
And update to reflect the new feature name unstable-msc4362, which
provides the new unstable prefix io.element.msc4362.encrypt_state_events
2025-11-18 11:10:55 +00:00
Jonas Platte
1db4a4cb9a Use MSRV-aware resolver 2025-11-12 14:58:30 +01:00
Kévin Commaille
8e25c36289 Upgrade Ruma (#5815)
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-29 15:02:27 +01:00
Jorge Martín
25b1c85998 feat(ffi): Upgrade UniFFI to v0.30.0 2025-10-29 10:08:03 +01:00
Stefan Ceriu
d117532fae feat(spaces): add support for MSC3230 and top level space order (#5799)
This is an unstable feature but as per
[MSC3230](https://github.com/matrix-org/matrix-spec-proposals/pull/3230)
each space room might have an optional
`m.space_order`/`org.matrix.msc3230.space_order` string field in its
room account data defining the lexicographical order in which the spaces
should be displayed, with spaces missing this field shown at the bottom
and ordered by their room id.
2025-10-24 12:18:29 +03:00
Kévin Commaille
f78f1795eb Upgrade Ruma
A new batch of breaking changes, allowing to stop providing dummy
`SupportedVersions` where they are not necessary.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-20 12:39:58 +02:00
Kévin Commaille
1e2bf39a7c Update Ruma
Brings changes to the requests metadata. It was changed from a struct to a trait, and the authentication scheme is now an associated type.

This allows to forbid at compile time requests that use an unsupported authentication scheme.
2025-10-14 15:32:32 +02:00
Kévin Commaille
cb3d281f8f Upgrade Ruma after removal of legacy mention push rules
The legacy mention push rules were removed, and the
`contains_display_name` condition was deprecated.

Some tests check for backwards-compatibility with legacy mentions, so we
need to add them back for those tests.

A test with an encrypted event was relying on the legacy mentions, so
the encrypted event was replaced with another one with an intentional
mention.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-09 15:08:38 +01:00
Kévin Commaille
cf4a1dee4b Upgrade Ruma after StringEnum changes
StringEnum now also implements Ord, PartialOrd, Eq and PartialEq so it
is not necessary to derive them. Also the ordering used is comparing the
string representation of the variants.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-09 15:08:38 +01:00
Kévin Commaille
487470be8f Upgrade Ruma after extended profile field stabilization
Extended profile fields were stabilized so the old endpoints are now
deprecated, and there are a few other changes.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-09 15:08:38 +01:00
Kévin Commaille
d01a28c9b2 Upgrade Ruma
Brings a breaking change with event structs being non-exhaustive now,
so they need to be constructed with methods rather than with a struct
declaration.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-06 10:21:00 +02:00
mgoldenberg
2e6790d0a5 IndexedDB: upgrade indexed_db_futures dependency (#5722)
**NOTE:** _this should not be merged until matrix-org/rust-indexed-db#1
is merged! The `[patch]` in this branch should point to the official
`matrix-org` fork of `rust-indexed_db`, but is currently pointed at my
personal fork._

## Background

This pull request makes updates
[`indexed_db_futures`](https://docs.rs/indexed_db_futures/latest/indexed_db_futures/index.html)
in the `matrix-sdk-indexeddb` crate. The reason we'd like to update this
dependency is because the version currently used does not fully support
the Chrome browser (see #5420).

The latest version of `indexed_db_futures` has significant changes. Many
of these changes can be integrated without issue. There is, however, a
single change which is incompatible with the `matrix-sdk-indexeddb`
crate. Namely, one cannot access the active transaction in the callback
to update the database (for details, see Alorel/rust-indexed-db#66).

### An Updated Proposal

Originally, new migrations were implemented in order to work around this
issue (see #5467). However, the proposal was ultimately rejected (see
@andybalaam's
[comment](https://github.com/matrix-org/matrix-rust-sdk/pull/5467#issuecomment-3149550617)).

For this reason, the dependency has instead been `[patch]`ed in the
top-level `Cargo.toml` with a modified version of `indexed_db_futures`
(see matrix-org/rust-indexed-db#1). Furthermore, these changes have been
proposed to the maintainer and are awaiting feedback (see
Alorel/rust-indexed-db#72).

### Why do we need the active transaction in our migrations?

The `crypto_store` module provides access to the active transaction to
its migrations (see
[here](ca89700dfe/crates/matrix-sdk-indexeddb/src/crypto_store/migrations/mod.rs (L211))).
Furthermore, there is a single migration (`v11_to_v12`) in the
`crypto_store` module which actually makes use of the active transaction
(see
[here](ca89700dfe/crates/matrix-sdk-indexeddb/src/crypto_store/migrations/v11_to_v12.rs (L23))).

For clarity, the reason `v11_to_v12` is problematic in the latest
versions of `indexed_db_futures` is because it is simply adding an index
to an object store which was created in a different migration and this
requires access to the active transaction. All the other migrations
create object stores and indices in the same migration, which does not
suffer from the same issue.

## Changes

- Move `indexed_db_futures` to the workspace `Cargo.toml` and add a
`[patch]` so that it points to a modified version.
- Add `GenericError` type and conversions in order to more easily map
`indexed_db_futures` errors into `matrix-sdk-*` errors.
- Update all IndexedDB interactions so that they use the upgraded
interface provided by `indexed_db_futures`
- Add functionality for running `wasm-pack` tests against Chrome


---
Closes #5420.

---

- [ ] Public API changes documented in changelogs (optional)


Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>

---------

Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-10-03 14:10:10 +02:00
Ivan Enderlin
0f0e37b677 chore: Update eyeball-im, eyeball-im-util and imbl.
This patch updates `eyeball-im` to 0.8.0, `eyeball-im-util` to 0.10.0
and `imbl` to 6.1.0.

The idea is to fix this bug https://github.com/jplatte/eyeball/pull/80.
2025-09-19 16:17:31 +02:00
Valere Fedronic
681863423c feat(rtc): Remove deprecated CallNotify in favour of RtcNotification
`CallNotify` event has been deprecated in favour of `RtcNotification` event https://github.com/ruma/ruma/pull/2199
2025-09-16 16:06:39 +02:00
Damir Jelić
4cc1cd1913 chore(sdk): Better logs for the duplicate one-time key error 2025-09-10 13:09:35 +00:00
Damir Jelić
f1064425bd Merge branch 'release-0.14' into poljar/merge-0.14-back-to-main 2025-09-10 11:20:39 +02:00
Damir Jelić
6c537d74de chore: Release matrix-sdk-base version 0.14.1 2025-09-10 10:41:18 +02:00
Valere
ab58c376dd bindings: MSC4310 call decline and subscribe to decline events 2025-09-06 11:15:49 +02:00
Damir Jelić
f8b343bece chore: Include the test-utils crate in the release
Turns out, we do actually need to release it :(
2025-09-04 16:36:05 +02:00
Damir Jelić
4c1f80faf7 chore: Release matrix-sdk version 0.14.0 2025-09-04 16:05:48 +02:00
Kévin Commaille
30672e6feb Upgrade Ruma
Use the brand new release.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-09-04 11:48:48 +02:00
Benjamin Bouvier
18affe3edd chore: bump Ruma 2025-09-02 14:57:49 +02:00
Damir Jelić
e53906a920 chore: Bump vergen
Vergen has split into multiple, more dedicated crates. This bump is
therefore a migration to vergen-gitcl.
2025-09-01 16:33:10 +02:00
Damir Jelić
1e30916754 chore: Bump most of our deps 2025-09-01 16:33:10 +02:00
Damir Jelić
79b7d6d235 chore: Use the upstream tracing repo
The necessary patch was merged[1] now, thanks to Jonas. We still need
the patch section since we don't have a release with the patch.

[1]: https://github.com/tokio-rs/tracing/pull/3000
2025-09-01 10:46:10 +02:00
Damir Jelić
05d0f9e077 chore: Don't patch the paranoid-android crate
Our paranoid-android for was configured to use our fork of the tracing
crates.

But paranoid-android will already use our tracing fork since it's
defined in the patch section. The patch section will override the
dependencies for all of our dependencies as well.

This can be seen in the dependency tree using:
    $ cargo tree -p matrix-sdk-ffi --target=aarch64-linux-android
2025-09-01 10:46:10 +02:00
Damir Jelić
c9162373a1 chore: Bump the tracing version we're using
This gets rid of a vulnerability[1] in tracing-subscriber. The forked
version we're using for the bindings were bumped as well.


[1]: https://github.com/advisories/GHSA-xwfj-jgwm-7wp5
2025-09-01 10:46:10 +02:00
Benjamin Bouvier
bbf8f9f900 feat(sdk): add support for msc4308 accompanying endpoint (fetching thread subscriptions) 2025-08-29 11:28:29 +02:00
Benjamin Bouvier
49dc2bb640 chore: bump Ruma
We get test fixes for free, thanks to the new push rules semantics
implemented in Ruma \o/
2025-08-29 11:28:29 +02:00
Benjamin Bouvier
d2feeaac30 refactor(sdk): avoid an explicit dependency on ruma-common
The `ruma-common` crate is reexported by `ruma`, which is in our
dependency tree anyways. This change makes it so that qrcode, the only
crate that was making use of `ruma-common`, now depends on `ruma`. It
may move it further down the line in the compilation pipeline, but this
is unlikely to affect compile times in a crazy way. The benefit is that
this avoids the burden of having to specify the ruma commit hash twice
in the top-level Cargo.toml, as well as replacing it twice when
overriding it.
2025-08-21 15:42:25 +02:00
Benjamin Bouvier
d70d758861 chore: bump Ruma 2025-08-18 13:04:35 +02:00
Kévin Commaille
33df0422e8 Upgrade Ruma: profile response
Handle the changes to the Response of the get_profile endpoint. The
content of the response is private and fields must be accessed with
methods.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-14 08:57:52 +02:00
Kévin Commaille
a3a239f999 Upgrade Ruma: revert StrippedState
Handle the previous breaking change that was reverted: `StrippedState`
was removed and `AnyStrippedStateEvent` is used again.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-14 08:57:52 +02:00
multisme
a66b2c5123 feat(test): add a test utils crate to make log initialization possible everywhere
This PR allows `init_tracing_for_test` to be called by any other crate in the sdk

Signed-off-by: multi [multiestunhappydev@gmail.com](mailto:multiestunhappydev@gmail.com)
2025-08-14 05:24:03 +00:00
Benjamin Bouvier
53f02c9f2d chore: bump Ruma
So as to get some changes for Element Call:
https://github.com/ruma/ruma/pull/2176
2025-08-12 16:06:26 +02:00
dragonfly1033
992774b8b5 Add the matrix-sdk-search crate
A new crate with a basic API for a creating, populating and searching a
room message index.

Signed-off-by: Shrey Patel shreyp@element.io
2025-08-07 16:01:41 +02:00
Benjamin Bouvier
8d3b1d3c7e chore: update Ruma 2025-08-06 15:28:43 +02:00
Kévin Commaille
056e90db25 feat(sdk): Use state_after in sync v2 (#5488)
It is supposed to be an improvement over `state`, since it allows the
server to send updates to the state that might not be reflected in the
timeline.

This is also the same behavior as in Simplified Sliding Sync.

This is MSC4222 that was accepted and is about to get merged in the
spec.

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-08-06 13:42:49 +01:00
Kévin Commaille
787861eb35 fix: Upgrade Ruma
This brings 2 important bug fixes:

- Make deprecated fields of `m.room.encrypted` optional: it seems that there are events without these fields in the wild.
- Fix deserialization of `RedactedRoomJoinRulesEventContent`. This was found by a bug report in Fractal that caused the same error as #3557 when restoring the client. So maybe we could consider that this bug is fixed? It is still possible that there is another deserialization error. 

There is also a breaking change in the format of the `state` field in response to `GET /v3/sync`.
2025-08-05 16:04:34 +02:00