15068 Commits

Author SHA1 Message Date
Benjamin Bouvier
8b14a8920c doc(sdk): add a module doc code example for search 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
98b36fe5e0 chore: update changelogs 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
a1f32d741f refactor(ffi): remove unused struct 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
ce01854078 refactor(sdk): Room::search_messages and Client::search_messages 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
7f8c9b0244 refactor(search): pass the number of results per batch in the ctors 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
3621acb445 refactor(sdk): move the high-level search helpers back to the SDK crate 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
3789374951 refactor(sdk): move search related functions to a message_search module 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
e54a36a1ca refactor(search): simplify global search more by avoiding is_done tracking 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
cf95c3f4cc refactor(search): avoid using a HashMap for linear iteration 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
6ccfc92139 refactor(search): simplify code around global search 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
4ee20befa3 chore: address first batch of review comments 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
4348d9de23 chore: add changelog entries for search! 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
477ee70e1c feat(ffi): bindings for search 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
83989c030a feat(ffi): allow enabling search with a search index store 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
717b6371f8 feat(multiverse): add support for global search (ctrl+g) 2026-04-20 12:18:52 +02:00
Benjamin Bouvier
6fa832cfc8 feat(search): higher-level Search API 2026-04-20 12:18:52 +02:00
Ivan Enderlin
1bff8cbe5d chore(ffi): Do not log errors in ClientError::from_str.
This patch stops logging errors in `ClientError::from_str` as it was an
artifact of some old debugging sessions.
2026-04-20 11:33:15 +02:00
Ivan Enderlin
9bb67e8422 fix(ffi): Use the ERROR log level for errors.
This patch changes a `warn!` to an `error!` in `ClientError`. There are
errors, let's use the proper log level here.
2026-04-20 11:33:15 +02:00
Damir Jelić
c962a52f73 ci: Add a zizmor action 2026-04-20 09:49:55 +02:00
Damir Jelić
4d20b481c1 ci: Upload the coverage directly as part of the coverage workflow 2026-04-20 09:49:55 +02:00
Damir Jelić
a5136c7384 ci: Add a zizmor config and use correct hashes for our github actions 2026-04-20 09:49:55 +02:00
Andy Balaam
0e120549ce Remove unneeded TODO in RoomKeyBundleContent
Quoting @poljar:

> If you follow the stack till you get where the secret key is, you end up here:
> 6282fd8838/crates/ruma-events/src/room.rs (L269-L273)
> And that is now zeroized.
> So yeah, the TODO was resolved in Ruma.
2026-04-17 16:18:36 +02:00
Damir Jelić
1e74c48351 fix(thread): Only apply valid edits in the thread summary 2026-04-17 12:34:47 +02:00
Damir Jelić
9e242abda9 test(latest-event): Check that we don't apply invalid edits in the latest event 2026-04-17 12:34:47 +02:00
Damir Jelić
62ff895ce8 fix(latest-event): Don't apply invalid edits on the latest event 2026-04-17 12:34:47 +02:00
Damir Jelić
d0d22ece78 refactor(latest-event): Ensure we have access to the event JSON when deciding on a latest event 2026-04-17 12:34:47 +02:00
Damir Jelić
d49d86e8b0 fix(ui): Follow the spec more closely in how we reject invalid edits 2026-04-17 12:34:47 +02:00
Damir Jelić
b226191bf4 test(common): Add some tests to validate the edit validation logic 2026-04-17 12:34:47 +02:00
Damir Jelić
21d7cd1b9d feat(common): Add a function to validate edits 2026-04-17 12:34:47 +02:00
Ivan Enderlin
b066260554 doc(ui): Add #6459 in the `CHANGELOG.md. 2026-04-17 11:02:21 +02:00
Ivan Enderlin
dbc6e3c3aa fix(ui): Fix a possible panic in Switch by updating async-rx.
This patch updates `async-rx` to fix a possible panic in `Switch`. It
now requires the outer stream to implement `FusedStream` (for the moment).
2026-04-17 11:02:21 +02:00
Benoit Marty
3293c94451 feat(ffi): Expose Client.request_openid_token() in order to let sdk clients request an openId token 2026-04-17 08:29:43 +00:00
Andy Balaam
53385798f6 Changelog update for #6457 2026-04-17 09:15:58 +01:00
Andy Balaam
d49736455b Discard room key if someone leaves a room for a non-leave reason e.g. ban 2026-04-17 09:15:58 +01:00
Andy Balaam
e278a99a20 Factor out parts of test_history_share_on_invite_room_key_rotation 2026-04-17 09:15:58 +01:00
Andy Balaam
d5c7c886a1 Add a note helping to understand that an existing test is sufficient to cover e.g. Ban events as well as Leave 2026-04-17 09:15:58 +01:00
Ivan Enderlin
b9b40c0ef2 doc(sdk): Add #6453 in the `CHANGELOG.md. 2026-04-15 17:49:46 +02:00
Ivan Enderlin
99d60bcc70 fix(sdk): Fix an infinite loop when loading pinned events from the storage.
This patch fixes a critical infinite loop when loading pinned events
from the storage if and only if there is more than one chunk for the
pinned events.

The previous implementation was broken in two ways:

1. if there was no previous chunk, then `prev` was set to `None`, but
   `previous` was never updated, so it was loop forever,
2. `load_previous_chunk` was called with the `last_chunk.previous` chunk
   identifier, which is incorrect: it must be called with the last chunk
   identifier, not the previous': otherwise it skips one chunk every time.

This patch adds a test to ensure everything works as expected.
2026-04-15 17:49:46 +02:00
Damir Jelić
64d602141a chore: Bump rustls and rustls-webpki
There appears to be a security issue.
2026-04-15 15:04:02 +02:00
Floriane TUERNAL SABOTINOV
59d2f8d4af refactor(examples): update get-profiles example to use Account::fetch_user_profile
Fixes #5902

## What this PR does

Keeps the existing `Client::send()` demo but extends it with:

- A doc comment on `get_profile` explaining the spec behaviour and the 401 
condition on  (Synapse's `require_auth_for_profile_requests`)
- A `get_profile_authenticated()` fallback using `account().fetch_user_profile()` 
which internally uses `force_auth()`
2026-04-15 13:00:41 +00:00
Kévin Commaille
80a253ada9 test(sdk): Add tests for profile capabilities
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-15 13:14:27 +02:00
Kévin Commaille
ec5082bb9c fix(client): Fix logic for profile fields capabilities
The current implementation assumes that if the `m.profile_fields`
capability is missing, it means that the capability is not enabled, but
this is not what the spec says. However the spec says that it depends on
the Matrix versions advertised by the homeserver. So this adds a method
that properly computes the capability depending on the supported
versions too.

Similarly, for the display name and avatar URL fields the implementation
assumes that if the `m.profile_fields` capability is present but
disabled, we should fallback to the legacy capabilities. This behavior
is not present in the spec, so the code is changed to always use the new
capability when it is present, whether it is enabled or not. The
legacy capabilities are only used if the new capability is missing and
the homeserver doesn't advertise support for extended profile fields.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2026-04-15 13:14:27 +02:00
Johannes Marbach
63f5be6935 feat(sync): Allow setting a custom Sliding Sync connection ID and timeline limit on RoomListService
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2026-04-15 11:06:57 +02:00
dependabot[bot]
dab87b7731 chore(deps): bump CodSpeedHQ/action from 4.12.1 to 4.13.0
Bumps [CodSpeedHQ/action](https://github.com/codspeedhq/action) from 4.12.1 to 4.13.0.
- [Release notes](https://github.com/codspeedhq/action/releases)
- [Changelog](https://github.com/CodSpeedHQ/action/blob/main/CHANGELOG.md)
- [Commits](1c8ae48435...db35df748d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 16:03:20 +02:00
dependabot[bot]
63f33a081f chore(deps): bump taiki-e/install-action from 2.68.26 to 2.74.0
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.68.26 to 2.74.0.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Commits](https://github.com/taiki-e/install-action/compare/v2.68.26...v2.74.0)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.74.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 15:42:51 +02:00
Damir Jelić
8b762b04df ci: Install cargo-llvm-cov explicitly for the coverage action as well 2026-04-14 15:05:28 +02:00
Ivan Enderlin
a9ef675b1c chore(sdk): Move `insert_sent_event_from_send_queue. 2026-04-14 14:45:14 +02:00
Ivan Enderlin
e69bb96144 test(integration): Fix the test_local_echo_to_send_event_has_encryption_info test.
This test forgot to subscribe to the Event Cache, hence the result
was partially okay. It was working by luck before. With the previous
commits, it was not possible to work without the Event Cache being
listening to the sync.
2026-04-14 14:45:14 +02:00
Ivan Enderlin
63b8fc8b47 test: Adjust tests according to previous patches.
This patch adjust tests since the Event Cache ignores events from the
Send Queue if the cache is empty. It mostly impacts the tests as this
scenario is pretty rare in real world use cases.
2026-04-14 14:45:14 +02:00
Ivan Enderlin
d68879d0aa test(sdk): Test Send Queue inserts in the Event Cache as expected. 2026-04-14 14:45:14 +02:00