Commit Graph

2258 Commits

Author SHA1 Message Date
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
Jorge Martín
eda561e00e refactor(ffi): Replace derefs and add doc comment to thread_root_event_id 2025-09-23 14:13:34 +02:00
Jorge Martín
27ba6d070b feat(ffi): Expose TimelineEvent::thread_root_event_id 2025-09-23 14:13:34 +02:00
Jorge Martín
14ca34b09b feat(ffi): Add Room::load_or_fetch_event to the FFI layer
This way we can retrieve random events in a room and check their properties - this is needed to decide whether a permalink for an event should open in a thread or not
2025-09-23 14:13:34 +02:00
Benjamin Bouvier
a5e84230c7 chore(ffi): rejigger recent emoji code around so as to work with default features disabled
For some reason, running `cargo xtask ci clippy` locally would now fail,
complaining that the recent emoji functions didn't exist, in the FFI
layer. I suspect it's because some of the uniffi derive macro to export
functions incorrectly propagates the `cfg` guards; so a solution is to
move all this code under a new mod, that's enabled if and only if the
feature's enabled.
2025-09-22 11:42:10 +02:00
Ivan Enderlin
fc12a7340f chore(ui): Add a temporary entries_with_dynamic_adapters_with.
This patch adds a temporary
`RoomList::entries_with_dynamic_adapters_with` method to help debug an
issue in Element X.
2025-09-19 15:55:57 +02:00
Doug
9cd7760858 ffi: Expose is_direct on SpaceRoom. 2025-09-18 18:56:03 +03:00
Ivan Enderlin
a84c97b292 feat(ui): Introduce room_list_service::Room to cache data.
This patch improves throughput by +710% in `room_list_service` sorters
and filters. It introduces a new `room_list_service::Room` type that
derefs to `matrix_sdk::Room`. However, it **caches** some data from
`matrix_sdk::Room`. Why doing so? Because filters, but more specifically
sorters!, are calling methods on `matrix_sdk::Room`, so likely on
`matrix_sdk::RoomInfo`, quite intensively. `RoomInfo` is behind a
`SharedObservable`, which means it's behind a lock. Each time a sorter
sorts 2 rooms, the lock on `RoomInfo` can be called twice or more.

By caching the data, `RoomInfo` is reached once per refresh data, but
not during the filtering nor the sorting. It greatly reduces contention
on the `RoomInfo` lock, which improves the throughput by +710%, and the
time by -87%.

The cached data are refreshed in `merge_stream_and_receiver` when
(i) the stream of `Room` is updated, or when (ii) the stream of
`RoomInfoNotableUpdate` is updated. It's a central place it happens,
which isolates the behaviour.
2025-09-18 15:38:16 +02:00
Ivan Enderlin
efcb7125ad chore(ffi): Define new log target for deserialized_responses.
This patch defines a new log target,
`MatrixSdkCommonDeserializedResponses`. It is enabled by the
`SyncProfiling`, `EventCache` or `Timeline` log packs.

This patch also changes the level of the log in
`TimelineEvent::timestamp` from `trace` to `warn`.
2025-09-17 11:33:14 +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
Stefan Ceriu
8c6922d5a9 feat(spaces): use the space children_state received from /hierarchy to populate children via parameters and expose them on SpaceRooms 2025-09-16 12:55:58 +03:00
Stefan Ceriu
ac68c4a47d chore(ffi): expose the new SpaceRoomList space and its respective updates publisher. 2025-09-15 15:31:49 +03:00
Stefan Ceriu
68cb3fb6a4 feat(spaces): expose the parent space on the SpaceRoomList 2025-09-15 15:31:49 +03:00
Jorge Martín
bb9bdee4a7 refactor: fix doc comment issues 2025-09-12 08:21:14 +02:00
Jorge Martín
b2df2742bd refactor: Move the recent emoji functions from client to account.
Also, make sure updating the emojis first fetches the most up-to-date data.
2025-09-12 08:21:14 +02:00
Jorge Martín
9776ae6acd refactor: rename feature to experimental-element-recent-emoji 2025-09-12 08:21:14 +02:00
Jorge Martín
5522509e6b feat(ffi): Add bindings for the recent emojis 2025-09-12 08:21:14 +02:00
Ivan Enderlin
f65bb6016c refactor(common): Rename store_locks to cross_process_lock. 2025-09-10 20:35:45 +02:00
Valere
2248bbf6ab fix adding both final and dev id doesn't work with ruma alias 2025-09-10 13:07:48 +02:00
dragonfly1033
2afbdfae0b Split media store from event cache store. (#5568)
This PR is a start to the process of splitting the media store from the
event cache store. #5410

It contains:
* Split `MediaStore` trait from `EventCacheStore`. 
* Rename `EventCacheStoreMedia` to `MediaStoreInner`. 
* Move relevant tests into `MediaStoreIntegrationTests`.

This will be done over 3 PR's (reviewing 1, 2, 3 then merging 3 into 2
into 1).

A reminder comment for my own sanity:
This PR will not pass tests until after merging.

Current state of this PR:
- [x] Step 1 reviewed #5568
- [x] Step 2 reviewed #5569 
- [x] Step 3 reviewed #5571 
- [x] Step 3 merged into Step 2
- [x] Step 2 merged into Step 1
- [ ] Add changes to changelog.
- [ ] Ready to merge 🎉 

Note, may also want to: 
* Re-organize file structure
* Split/refactor benchmarks namely `benchmarks/benches/event_cache.rs`

<!-- description of the changes in this PR -->

- [ ] 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: Shrey Patel shreyp@element.io

---------

Co-authored-by: Shrey Patel <shreyp@element.io>
2025-09-10 12:03:02 +02:00
Timo
d2ca0262ae feat(element-call url params): split url params into configuration and properties (#5560)
This PR is part of an onging effort to move responsiblity to the EC app
and out of the EX apps.

4 intends (f.ex `join_existing` `start_new_dm`... ) (as url paramters)
are introduced in recent element call versions. Those intends behave
like defaults. If an intend is set a set of url parameters are
predefined.
Not all params can be covered by the intend (for insteance the
`widget_id` or the `host_url`).
This PR splits the url parameters into configuration (things that can be
configured by the intent) and properties (things that still need to be
passed one by one)


The goal with this change is that EX only needs to configre the intent
once and the EC codebase can update the behavior in those 4 specific
scenarios in case new features come along (auto hangup when other
participants leave, send call ring notification...)


Signed-off-by: Timo K <toger5@hotmail.de>

<!-- description of the changes in this PR -->

- [ ] 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: Timo K <toger5@hotmail.de>
2025-09-10 11:46:21 +02:00
Valere
502d6d3095 widget capabilities rtc decline test 2025-09-09 18:22:49 +02:00
Valere
db4ce0bea5 widget-driver: Add read/send capabilities for rtc decline event 2025-09-09 18:22:49 +02:00
Damir Jelić
ce3b67f801 Update bindings/matrix-sdk-ffi/CHANGELOG.md
Co-authored-by: Ivan Enderlin <ivan@mnt.io>
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2025-09-09 10:06:21 +02:00
Damir Jelić
260037c4c7 Remove the normalized power level from the bindings
The field is reportedly unused so there's no need to spend time to
calculate the value and pass it over the FFI.
2025-09-09 10:06:21 +02:00
Valere
412b7bbc7b add changelog 2025-09-06 11:15:49 +02:00
Valere
4ef249dc6e review: quick new lines for clarity 2025-09-06 11:15:49 +02:00
Valere
ab58c376dd bindings: MSC4310 call decline and subscribe to decline events 2025-09-06 11:15:49 +02:00
Ivan Enderlin
b1c28f4bc1 feat(ui): sync_service::State::Error contains the cause error.
This patch updates the `State::Error` variant to contain the error that
led to this state.
2025-09-05 22:31:53 +02:00
Damir Jelić
4c1f80faf7 chore: Release matrix-sdk version 0.14.0 2025-09-04 16:05:48 +02:00
Jorge Martín
7767ef6ca3 fix(ffi): Adapt FFI calls to Client::server_vendor_info to the new API
Specially important, the one from `ClientBuilder::build` as it avoids a situation where the builder would infinitely try to get a response for this request and never create the `Client` or fail.
2025-09-03 13:18:14 +02:00
Benjamin Bouvier
cc0bf91a06 feat(ffi): add a sync profiling log pack 2025-09-03 12:46:09 +02:00
Ivan Enderlin
27a28e55d1 feat(ui): Add is_own and profile to LatestEventValue::Remote.
This patch adds 2 fields to `LatestEventValue::Remote`: `is_own` and
`profile`, which are necessary for the app consumers.
2025-09-02 18:18:26 +02:00
Ivan Enderlin
d6a418f46a feat(ffi): Create Room::new_latest_event + LatestEventValue.
This patch creates the `LatestEventValue` in `matrix_sdk_ffi` and
exposes it via `Room::new_latest_event`.
2025-09-02 18:18:26 +02:00
Ivan Enderlin
268e14e4f5 feat(ui): Create timeline::LatestEventValue. 2025-09-02 18:18:26 +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
Benjamin Bouvier
8c0a918e6e refactor(sdk): introduce a lightweight ThreadSubscription for external consumers, and rename previous one to StoredThreadSubscription
External consumers are likely not interested about unsubscriptions and
the bump stamp values themselves, so let's not expose these to them.
2025-09-01 10:38:34 +02:00
Benjamin Bouvier
33c317e6d2 refactor(sdk): put the subscription status + bumpstamp back into the stored thread subscription 2025-09-01 10:38:34 +02:00
Stefan Ceriu
04728cc1a6 chore(spaces): various documentation fixes 2025-08-29 18:35:27 +03:00
Stefan Ceriu
3c069f0c5c fix(spaces): compute the initial joined_spaces value when first setting up a subscription
- fixes values being reported only after the first sync update
2025-08-29 18:35:27 +03:00
Stefan Ceriu
9caa0817ae docs(spaces): add documentation, comments and examples 2025-08-29 18:35:27 +03:00
Stefan Ceriu
50446377de change(spaces): publish VectorDiffs instead of a full vectors for joined spaces and space room list subscriptions 2025-08-29 18:35:27 +03:00
Stefan Ceriu
87fdd3c3bf chore(spaces): converge on single naming scheme for all spaces related components on both the UI and the FFI crates 2025-08-29 18:35:27 +03:00
Stefan Ceriu
990fe86fdc change(spaces): make the SpaceService constructor non-async and instead automatically setup a client subscription when requesting the joined services subscription 2025-08-29 18:35:27 +03:00
Stefan Ceriu
03ffa4c9a4 feat(spaces): expose the number of children each space room has 2025-08-29 18:35:27 +03:00
Stefan Ceriu
f8b5992101 fix(spaces): return the TaskHandle from the FFI space service subscription methods so it can be retained on the client side 2025-08-29 18:35:27 +03:00
Stefan Ceriu
97a5fbebfb feat(ffi): expose SpaceService::subscribe_to_joined_spaces and SpaceServiceRoomList::paginate 2025-08-29 18:35:27 +03:00
Stefan Ceriu
aa4b176ab3 fix(spaces): fix complement-crypto failures because of using an outdated uniffi version
- automatic Arc inference was introduced in 0.27 and complement is using 0.25
2025-08-29 18:35:27 +03:00