Commit Graph

10112 Commits

Author SHA1 Message Date
Stefan Ceriu
3185683ba3 test(matrix-sdk): verify cross-room score ordering in global search 2026-06-09 12:33:25 +03:00
Stefan Ceriu
828257e7c6 feat(matrix-sdk): sort global search results by full-text search relevance score 2026-06-09 12:33:25 +03:00
Stefan Ceriu
b1f9372bff feat(matrix-sdk-search): expose full-text search relevance scores from RoomIndex::search 2026-06-09 12:18:54 +03:00
Jorge Martín
99caed0115 doc: Add changelog entry 2026-06-08 16:54:20 +02:00
Jorge Martín
13e9550b0e feat(ui): Allow specifying membership states for TimelineEventFilter
This allows us to only include/exclude certain mebership changes
2026-06-08 16:54:20 +02:00
Damir Jelić
f1bea7288b Put the correct security impact for CVE-2026-45057
While we're here also add an entry for the UI crate
2026-06-04 12:09:28 +02:00
Damir Jelić
0e100bfcf2 Move the edit validation changelog entry to the correct place
Now that the advisory is published we can move it to the correct section
and add the relevant security issue info.
2026-06-04 10:51:23 +02:00
Damir Jelić
03d8e0d1f6 chore: Mention the Ruma bump in the crypto crate changelog as well 2026-06-03 10:54:53 +02:00
Richard van der Hoff
8a838bd474 Add security links to matrix-sdk-crypto 0.17.0 changelog (#6636) 2026-06-03 06:49:20 +00:00
Paul8711
b1debb3460 fix: resolve room alias to id before evaluating pre-join info 2026-06-02 20:09:49 +02:00
Ivan Enderlin
631af2e7f1 chore(sdk): Replace async_once_cell by tokio::sync::OnceCell.
This patch removes the `async_once_cell` dependency by
`tokio::sync::OnceCell`.
2026-06-02 16:30:57 +02:00
Damir Jelić
1c44fb6621 chore: Release matrix-sdk version 0.18.0 2026-06-02 13:29:09 +02:00
Damir Jelić
56797cb89a chore: Move some changelog fragments to the correct folder 2026-06-02 13:24:02 +02:00
Kévin Commaille
3a9fd9f790 Upgrade Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-06-01 11:35:15 +02:00
Yorusaka Miyabi
e4c55a7443 chore(search): Bump tantivy
Signed-off-by: Yorusaka Miyabi <23130178+ShadowRZ@users.noreply.github.com>
2026-05-28 11:22:54 +02:00
Mauro Romito
3a44b50518 docs: changelog added 2026-05-26 12:33:08 +03:00
Mauro Romito
55262807e1 feat (bindings): expose tile_server to FFI 2026-05-26 12:33:08 +03:00
Ivan Enderlin
1205c2b212 doc(sdk): Add the changelog file. 2026-05-22 11:23:24 +02:00
Ivan Enderlin
eb6d5c330c test(sdk): Add a test to ensure no Client cyclic reference with ThreadSubscriptionCatchup. 2026-05-22 11:23:24 +02:00
Ivan Enderlin
b01ce21a24 fix(sdk): Remove a cyclic reference of Client in ThreadSubscriptionCatchup.
This patch fixes cyclic reference of `Client` in
`ThreadSubscriptionCatchup`.

`ThreadSubscriptionCatchup` starts a task that call
`thread_subscriptions_catchup_task`. This function captures a clone of
`ThreadSubscriptionCatchup` (why not…) which contains a `WeakClient`,
all good, no cycle here! However, the real task (not the function)
captures `Client` to call `enabled_thread_subscriptions` to know
if the function `thread_subscriptions_catchup_task` must be called.
Consequently, the task captures a clone of `Client`, boom, we have
a cycle.

This patch fixes the problem by spawning the task if and only if
`Client::enabled_thread_subscriptions` returns `Ok(true)`. This check is
done outside the task. It seems saner and avoid creating this cycle.

Consequently, the `ThreadSubscriptionCatchup::new` method becomes
`async`, which is perfectly fine as it was already wrapper inside an
`async` block when initialised by the `Client`.
2026-05-22 11:23:24 +02:00
Michael Goldenberg
b847983dbf refactor(base): hold state store lock while processing sync response
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2026-05-21 12:34:28 +02:00
Daniel Anderson
d3c499ddbc feat(sdk): expose append parameter on Pusher::set
Forwards the Matrix spec's append flag on POST /_matrix/client/v3/pushers/set
through Pusher::set. When true, the homeserver keeps any existing pusher
with the same app_id and pushkey registered for other users instead of
replacing it. Needed for multi-profile clients on a single device.

Breaking change: Pusher::set now takes an append: bool parameter.

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
2026-05-21 12:53:08 +03:00
Damir Jelić
82c24a891b fix(sdk): Make the pinned events sorting deterministic
The previous sorting logic relied on SystemTime::now, which introduces
non-deterministic behavior which might result in a panic.
2026-05-20 16:54:20 +02:00
Hugh Nimmo-Smith
3372ca3577 test(sdk): explicitly assert homserver URL swap for QR login 2026-05-20 15:56:33 +02:00
Daniel Anderson
a80fa910da feat(base): expose m.fully_read event ID on RoomInfo
Persist `m.fully_read` on `BaseRoomInfo` and expose it
on `RoomInfo::fully_read_event_id` and `Room::fully_read_event_id`.

The `m.fully_read` response processor now stores the event ID
on the room info and emits `RoomInfoNotableUpdateReasons::FULLY_READ`

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
2026-05-20 11:46:20 +03:00
Daniel Anderson
4b1ae064c7 feat(base): add FULLY_READ notable update reason
Add `RoomInfoNotableUpdateReasons::FULLY_READ`, used for
when the `m.fully_read` marker for a room changes.

Breaking change: the backing bitflag widens from `u8` to `u16`
for the new flag to not alter the existing bit positions.

Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
2026-05-20 11:46:20 +03:00
Ivan Enderlin
b6d0f8a0a7 chore: Fix rumdl errors and warnings by hand. 2026-05-18 15:05:52 +02:00
Ivan Enderlin
7d31912f0d chore: Run rumdl check --fix. 2026-05-18 15:05:52 +02:00
Kévin Commaille
edb5d41597 refactor(sdk): Make RumaApiError a type alias of UiaaResponse
They have similar variants containing the same data so it's not useful
to have separate types.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-15 12:04:54 +02:00
Kévin Commaille
6a551f31e2 refactor(sdk): Simplify some error matching
By using helper methods on error types.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-15 12:04:54 +02:00
Kévin Commaille
44a12a7849 refactor(sdk): Use upstream method to match unsupported endpoint error
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-05-15 12:04:54 +02:00
Jorge Martín
7c13b60e28 fix: Refresh timeline items when their sender's avatar URL changes
This is similar to what happens when a user display name changes, its ambiguity is calculated and if it changes, it reloads the associated timeline events.

In fact, this change tries to follow the same strategy as `AmbiguityCache`.
2026-05-15 11:56:27 +02:00
Damir Jelić
e5a50089c2 chore: Migrate changelogs to towncrier fragments 2026-05-15 11:15:38 +02:00
Damir Jelić
2a8d75e43f chore: Add the changelog fragment directories 2026-05-14 15:56:14 +02:00
Damir Jelić
8fb918e062 chore: Update our changelogs so towncrier knows where to insert changelogs 2026-05-14 15:56:14 +02:00
Benoit Marty
c253114b05 fix: can_be_replied_to() returns false for LiveLocation events. 2026-05-13 13:38:12 +01:00
Stefan Ceriu
6792416efb chore(timeline): replace duplicate read receipt panic with plain error 2026-05-12 17:25:48 +03:00
Stefan Ceriu
2497f0ebd3 chore(stores): switch from pause/resume semantics to close and reopen ones 2026-05-12 17:25:48 +03:00
Stefan Ceriu
e72841ab79 change(stores): remove the default pause/resume implementations and replace them with concrete ones. 2026-05-12 17:25:48 +03:00
Stefan Ceriu
3f6887a69e chore(doc): update the documentation around pausing an resuming stores 2026-05-12 17:25:48 +03:00
Stefan Ceriu
e46cd9870d feat(client): expose a client pause/resume mechanism throughout the SDK
This patch exposes the pause/resume mechanism for SDK stores all the way up to
the FFI `Client`, so apps can temporarily release SQLite resources when moving
to the background and re-acquire them on resume.

The main use case is iOS backgrounding, where keeping SQLite file descriptors and
locks open can contribute to `0xdead10cc` terminations by the operating system.
2026-05-12 17:25:48 +03:00
Stefan Ceriu
8e8e0ebef9 chore(tests): add pause/resume mechanism tests for all the stores 2026-05-12 17:25:48 +03:00
Stefan Ceriu
40d57cb717 feat(stores): implement pause/resume support in the crypto, event cache, state and media SQLite stores
This patch implements the main pause/resume logic in the underlying SDK stores.
The in memory stores no-op trough the default trait implementations.

The main change are limited to the sqlite crate:
- a new type called `SqliteConnections` has been introduced which now holds a
store's read connection pools as well as the always on write connection. This
lives as an optional on each store's level and gets set to None whenever the
store is paused
- during the pausing phase `SqliteConnections` (through its `pause_connections`
method) does the following:
    - closes the read pool, directly dropping idle connections
    - waits for in flight writes to finish
    - tries a best effort WAL checkpoint
    - drops the write connection on a blocking thread
    - and waits for in-flight read connections to drain
    - this is all best effort with an eventual timeout
- resuming connections is also shared between the stores through
`SqliteConnections` and consists in building a new pool with the previous
configuration and creating a new write connection

# Conflicts:
#	crates/matrix-sdk-sqlite/src/crypto_store.rs
#	crates/matrix-sdk-sqlite/src/event_cache_store.rs
#	crates/matrix-sdk-sqlite/src/media_store.rs
#	crates/matrix-sdk-sqlite/src/state_store.rs
2026-05-12 17:25:48 +03:00
Stefan Ceriu
a0fbcd407b feat(stores): add pause and resume trait definitions and default implementations for all the stores 2026-05-12 17:25:48 +03:00
Jorge Martín
2d8b3cee25 doc: Add changelog entries 2026-05-11 16:40:09 +02:00
Jorge Martín
8b5bc935ea refactor: Use AsyncMutex to avoid most of the issues about the MutexGuard and .await 2026-05-11 16:40:09 +02:00
Jorge Martín
dd128d47be refactor: Make SpaceRoom::new_from_summary async too 2026-05-11 16:40:09 +02:00
Jorge Martín
29343233b7 refactor: Make SpaceRoom::new_from_known async so we can properly compute is_dm 2026-05-11 16:40:09 +02:00
Damir Jelić
58141e422d Merge pull request #6559 from matrix-org/poljar/merge-release-0-16-back
Merge the 0.16-release branch back to main
2026-05-11 15:44:23 +02:00
Ivan Enderlin
65072dd8a8 chore: Use values() instead of iter() and discard the keys. 2026-05-10 20:32:14 +02:00