Commit Graph

2306 Commits

Author SHA1 Message Date
Jorge Martín
385f7aa86d doc: Fix docs for ffi::Timeline::latest_event_id 2025-11-18 12:26:30 +01:00
Jorge Martín
5f996f77c6 reafactor(ffi): Have ffi::Timeline::latest_event_id use ui::Timeline::latest_event_id, instead of ui::Timeline::latest_event
This is important because `latest_event` would also return local events, which won't have an event id.
2025-11-18 12:26:30 +01:00
Jorge Martín
4eb3cc9812 refactor(ffi): Remove unused Session::homeserver_url value 2025-11-18 12:16:28 +01:00
Jorge Martín
95d8ba94e1 doc: Add warnings about overriding the server URL
This may be dangerous when done while restoring an existing session.
2025-11-18 12:16:28 +01:00
JoFrost
17df3f84d0 feat(ffi): expose join_rules in OtherState::RoomJoinRules (#5863)
Expose the room join rules in the `OtherState::RoomJoinRules` event 
for the FFI timeline.

It reuses the existing `JoinRules` type from the client module and
converts the event content accordingly. This allows clients to inspect
the room’s current join rule directly from the event. Like `m.federate`,
this field was previously unavailable in the FFI variant of the SDK.

---------

Signed-off-by: JoFrost <20685007+JoFrost@users.noreply.github.com>
2025-11-13 15:20:17 +02:00
Jorge Martin Espinosa
f702364fe9 feat(sdk): Add a power level value field for StateEventType::SpaceChild (#5857)
Closes https://github.com/matrix-org/matrix-rust-sdk/issues/5839

Co-authored-by: Stefan Ceriu <stefanc@matrix.org>
2025-11-13 07:17:57 +00:00
Jorge Martín
cbd4722dcb doc: Add changelog entry 2025-11-11 14:50:00 +01:00
Johannes Marbach
f9584f5b2a feat(ffi): add sender and room information to sync notifications
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-08 09:30:11 +01:00
JoFrost
a6062a6cfd feat(ffi): expose m.federate and history visibility in their events (#5830)
Hello, I'm writing on behalf of the Citadel product developed by ERCOM.
This PR expose `m.federate` and `history_visibility` in timeline diffs.
These fields are available in the Matrix SDK but were previously omitted
from the FFI variant.

Signed-off-by: JoFrost <20685007+JoFrost@users.noreply.github.com>
2025-11-07 16:16:17 +01:00
Johannes Marbach
0b66019632 feat(ffi): add bindings for granting login with a QR code
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-06 15:15:59 +01:00
Johannes Marbach
82c583b5bc feat(ffi): expose Client::register_notification_handler
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-11-05 10:09:31 +01:00
Richard van der Hoff
301ca5e2b8 Fix up changelogs incorrectly updated since 0.14.0 (#5828)
All of these entries have been incorrectly added to the changelogs
*since* 0.14.0 was released :(
2025-11-04 12:50:49 +00:00
Ivan Enderlin
12e39f5ef1 chore(ffi): Restore ClientBuilder::session_paths as #[deprecated].
This method restores and marks `ClientBuilder::session_paths` as
deprecated.
2025-10-29 15:28:20 +01:00
Ivan Enderlin
38875b021d chore(ffi): Allow clippy::result_large_err.
These two methods are used only once, it's fine to get a large error
here.
2025-10-29 15:28:20 +01:00
Ivan Enderlin
0bbfc3ce41 doc(ffi): Update CHANGELOG.md and README.md. 2025-10-29 15:28:20 +01:00
Ivan Enderlin
7c6ff517d5 feat(ffi): Add IndexedDB and in-memory session stores support.
This patch introduces the `sqlite` and `indexeddb` feature flag,
enabling the use of SQLite or IndexedDB for the stores. This patch also
introduces the ability to use non-persistent, in-memory stores.

The new `ClientBuilder::in_memory_store`, `ClientBuilder::sqlite_store`
and `ClientBuilder::indexeddb_store` methods are introduced to
configure the stores. This patch adds new `SqliteStoreBuilder` and
`IndexedDbStoreBuilder` structure.
2025-10-29 15:28:20 +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
c3e01a6902 doc: Add changelog 2025-10-29 10:08:03 +01:00
Jorge Martín
25b1c85998 feat(ffi): Upgrade UniFFI to v0.30.0 2025-10-29 10:08:03 +01:00
Jorge Martín
9af8fad880 doc: Add changelogs 2025-10-28 10:57:31 +01:00
Jorge Martín
513a69c547 feat(ffi): Add Timeline::latest_event_id
It will allow us to fetch the latest event id coming from the SDK instead of deciding which one to use in the clients, which could be altered by filters, post-processing, etc.
2025-10-28 10:57:31 +01:00
Jorge Martín
2f58109853 feat(ffi): Add Room::mark_as_fully_read_unchecked
This method shouldn't be widely used, but it's useful when we want to mark the room as fully read when leaving it and at the same time we have to destroy the room and timeline instances immediately so their in-memory cache is cleared
2025-10-28 10:57:31 +01:00
Johannes Marbach
68b902e4bc feat(ffi): add bindings for listening to global send queue updates
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-24 17:43:29 +02:00
Damir Jelić
3733ee8534 chore: Remove the matrix-sdk-crypto re-export in the matrix-sdk crate 2025-10-24 16:37:15 +02:00
Johannes Marbach
34d71b0392 feat(composer): add support for attachments in drafts
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-21 11:00:24 +01:00
Johannes Marbach
5f54237f4f feat(ffi): add bindings for logging in by generating a QR code on the new device
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-20 13:47:41 +02:00
Johannes Marbach
e8fb133cbf feat(oauth): Enable new devices to generate a QR code for login
This patch adds the complementary login flow for the already existing QR code login support.
Namely, previously it was only possible for the new device to scan a QR code to log in. Now
it's possible for the new device to create the QR code and let the existing device scan it.

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

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-15 16:04:50 +02:00
Kévin Commaille
a8aa8761d8 Add changelog for waveform changes
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-13 14:10:14 +02:00
Kévin Commaille
bfc96181dd refactor(sdk): Change waveform to be a list of values between 0 and 1
Most clients will probably work with values between 0 and 1 and need to
convert it just to send it, so we can move that conversion into the SDK.

This is also more forwards-compatible, because MSC3246 now has a
different max value for the amplitude, so when this becomes stable, the
only change needed will be in the SDK.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-13 14:10:14 +02:00
Kévin Commaille
eb1ee434b3 refactor(sdk): Allow to send waveform for any audio message
By moving the waveform declaration into `BaseAudioInfo`.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-13 14:10:14 +02:00
Johannes Marbach
9b485013e1 feat(ffi): add bindings for listening to room send queue updates
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-09 15:18:04 +01: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
Johannes Marbach
358803783f feat(oauth): add LoginProgress::SyncingSecrets
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-08 11:00:54 +02:00
Johannes Marbach
79e1930b22 Make LoginProgres::EstablishingSecureChannel generic in order to reuse it for the other QR login flow
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-10-07 21:00:42 +02:00
Stefan Ceriu
c7b4b5dc05 chore(ffi): expose the computed SpaceRooms display name
This reuses the same naming scheme used in the FFI Room and RoomInfo
2025-10-07 15:33:36 +03: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
Andy Balaam
32f3670aeb task(crypto): Warn API users to fetch device info before processing verification requests 2025-10-03 14:21:44 +01:00
Jorge Martín
2822815384 feat(ffi): Add NotificationSettings::get_raw_push_rules
This allows clients to get the raw push rules so they can be added to bug reports if needed
2025-10-03 15:16:07 +02:00
Kévin Commaille
bb6ba08dfb fix: Remove newly detected unused imports
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-03 12:27:50 +03:00
Stefan Ceriu
8e8ad0167a change(spaces): return a reference to the rooms vector from the leave handle
well now
2025-10-02 12:41:42 +03:00
Stefan Ceriu
0f78959c9a change(spaces): compute LeaveSpaceRooms for the LeaveSpaceHandle asynchronously in its constructor 2025-10-02 12:41:42 +03:00
Stefan Ceriu
7a431a3afd change(spaces): have the leave space rooms interface take a filter
This helps make sure the rooms to be left were actually part of the space graph as they are stored inside the `LeaveRoomHandle` and filtered from there. On the FFI layer on the other hand, we still take plain strings as working around the limitations would've significantly complicated things.
2025-10-02 12:41:42 +03:00
Stefan Ceriu
3a60d34f3f feat(ffi): expose the space service leaving interfaces
fix newline ffi
2025-10-02 12:41:42 +03:00
Kévin Commaille
70b19cc907 refactor(sdk): Use TextMessageEventContent to send a caption
It doesn't make sense to send a formatted caption without a plain text
caption so using TextMessageEventContent forces the latter to be present.

This also allows to use the helpful constructors of
TextMessageEventContent.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-10-02 08:15:56 +02:00
Hubert Chathi
57d21ccdf6 Create a separate error variant to indicate a failure importing a secret. (#5647)
Part of the fix to
https://github.com/element-hq/element-x-android/issues/5099

Allows applications to distinguish between errors that occur when
unlocking Secret Storage, or errors that occur when importing a secret,
so that they can display appropriate feedback (or not) to the user.

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

<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by:

---------

Signed-off-by: Hubert Chathi <hubertc@matrix.org>
2025-10-02 08:14:46 +02:00
Doug
d6d720c015 ffi: Expose a room list filter for spaces. 2025-09-26 10:22:53 +01:00
Jorge Martín
5f02212312 fix(ffi): ffi::Room::load_or_fetch_event fails with missing room_id
The raw event was being deserialized in a wrong way and it could have a missing room id in some cases, returning an error even when the event was found
2025-09-25 10:57:48 +02:00
Alexis Loiseau
0a0e31af83 feat(ui): add custom events to timeline when explicitly filtered
This allows custom message-like events (created by the `EventContent` macro from ruma) to be added to the timeline if they are explicitly allowed when building the timeline with a custom `event_filter`.

The custom event content is not available directly to the consumer, but it can still fetch it from the matrix-sdk client with its `event_id`, or display a "this type of event is not supported". 

Signed-off-by: Itess <me@aloiseau.com>

Fixes #5598.
2025-09-24 15:50:50 +00:00
Hubert Chathi
840ce43fed Add function to check if the user has another device to verify against (#5699)
Part of the fix for
https://github.com/element-hq/element-x-android/issues/4864 and
https://github.com/element-hq/element-x-ios/issues/4190

Allows applications to determine whether the user can verify against
another device in order to cross-sign their new device.
2025-09-24 11:31:42 +01:00
Jorge Martín
bcba5f4571 chore(doc): Add changelogs 2025-09-23 14:13:34 +02:00