Commit Graph

13223 Commits

Author SHA1 Message Date
Kévin Commaille
ca89700dfe refactor(ffi): Fix clippy lint
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-25 17:55:31 +02:00
Kévin Commaille
a0c87cfe4f Add changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-25 17:36:19 +02:00
Kévin Commaille
9ddc892aa0 fix(sdk): Support event types with variable suffix for event handlers
Previously they would just not work as we were trying to match a full
event type with a prefix.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-25 17:36:19 +02:00
Kévin Commaille
0a7ac18d9f refactor: Add IsPrefix = False bound on StaticEventContent bounds
Since those APIs only support a full event type, not an event type prefix.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-25 17:36:19 +02:00
Robin
d8b6966c0a Allow Element Call to send call notifications
For clients which integrate Element Call: Currently matrix-rust-sdk is responsible for sending the call notification event when joining MatrixRTC sessions, but this is planned to be changed soon. As of the upcoming Element Call 0.14.0 release, it will request the capability to send call notifications itself, and we should auto-approve this capability.
2025-07-25 09:20:39 +03:00
Damir Jelić
d40f04e32c chore: Remove the criterion function in the benchmarks
It's now equivalent to Criterion::default().
2025-07-24 17:11:03 +02:00
Damir Jelić
d8294a0788 Fix the compilation of the crypto bench 2025-07-24 17:09:59 +02:00
Damir Jelić
06a4476e7f ci: Disable a benchmark that panics on the CI 2025-07-24 16:48:28 +02:00
Andy Balaam
def1fedea3 feat(crypto): Refuse to decrypt to-device messages from unverified devices (when in exclude insecure mode) 2025-07-24 15:08:13 +01:00
Andy Balaam
d061e7a5b2 refactor(tests): Pass decryption_settings in to send_and_receive_encrypted_to_device_test_helper
To allow passing in different values in future tests.
2025-07-24 15:08:13 +01:00
Andy Balaam
f4619c91d3 refactor(tests): Re-use send_and_receive_encrypted_to_device_test_helper in 2 more tests 2025-07-24 15:08:13 +01:00
Andy Balaam
227f6eab85 refactor(tests): Take a reference to content in send_and_receive_encrypted_to_device_test_helper
This will allow us to re-use it in more tests.
2025-07-24 15:08:13 +01:00
Andy Balaam
16d7c3c094 refactor(crypto): Extract a method to check for to-device events from dehydrated devices 2025-07-24 15:08:13 +01:00
Andy Balaam
c238a0edb8 refactor(crypto): Pass DecryptionSettings in to OlmMachine::decrypt_to_device_event
This will be used in the next commit, but it was very noisy, so I
separated it out into this commit to make the next one easier to read.
2025-07-24 15:08:13 +01:00
Damir Jelić
06bf487512 chore: Attempt to get rid of a crash on CI where the runtime isn't used for a drop 2025-07-24 15:40:41 +02:00
Damir Jelić
c636ec63f4 chore: Inherit the release profile for the bench profile 2025-07-24 15:07:48 +02:00
Damir Jelić
ffe239d620 Actually respect the benchmarks matrix on CI 2025-07-24 14:40:14 +02:00
dragonfly1033
822b709107 feat(sdk): Leaving a room now leaves its predecessors as well
Signed-off-by: Shrey Patel shreyp@element.io
2025-07-24 13:56:05 +02:00
Damir Jelić
d75d7973b2 ci: Enable benchmarks on the CI 2025-07-24 13:37:45 +02:00
Damir Jelić
cfe3adce48 chore: Bump criterion 2025-07-24 13:37:45 +02:00
Damir Jelić
b478ae65f7 tests: Remove pprof 2025-07-24 13:37:45 +02:00
Michael Goldenberg
ada68e1114 feat(indexeddb): add IndexedDB-backed impl for EventCacheStore::find_event_relations
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-07-23 18:03:06 +02:00
Michael Goldenberg
c9137f0cad fix(indexeddb): Updates::PushItems performs an update if any provided item already exists
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-07-23 18:03:06 +02:00
Michael Goldenberg
4e0dab959a feat(indexeddb): add IndexedDB-backed impl for EventCacheStore::save_event
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-07-23 18:03:06 +02:00
Michael Goldenberg
e862ded147 feat(indexeddb): add IndexedDB-backed impl for EventCacheStore::find_event
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-07-23 18:03:06 +02:00
Michael Goldenberg
5cb033ad91 feat(indexeddb): add IndexedDB-backed impl for EventCacheStore::filter_duplicated_events
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-07-23 18:03:06 +02:00
Kévin Commaille
0e622cc5a1 Upgrade Ruma (phase 3)
This upgrade introduces support for room version 12[1].

[1]: https://matrix.org/blog/2025/07/security-predisclosure/)

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-23 14:32:05 +00:00
Jorge Martín
6d562eff2f fix: Restore the previous behaviour for calculating the timeout for syncs 2025-07-23 15:55:31 +02:00
Jorge Martín
af2e15e02f refactor(ffi): Add the default read_timeout value to the FFI layer 2025-07-23 15:55:31 +02:00
Jorge Martín
79aa5aaf16 refactor: Remove the default timeout when downloading media, rely on read_timeout instead
Users with poor network connectivity complained their downloads were cancelled for no good reason after 30s before (the default `timeout` value).
2025-07-23 15:55:31 +02:00
Jorge Martín
0833ffdef2 refactor: Add RequestConfig::read_timeout to cancel network connections that have been stale for longer than the specified timeout 2025-07-23 15:55:31 +02:00
Jorge Martín
16f7239215 refactor: Make RequestConfig::timeout optional
This allows us to remove the default timeout on a per-request basis
2025-07-23 15:55:31 +02:00
Doug
da946e51dd ffi: Update Client::get_url to return raw data and to throw on HTTP errors
Client::get_url is there for SDK consumers to be able to use the
existing HTTP stack (configuration and all) however in practice it was a
bit weird:
- Responses came back as strings limiting the types of resource that
could be fetched (as well as requiring the string to be converted back
to data before handed to a JSON decoder).
- HTTP errors weren't being raised and instead you would find the (e.g.
404) error response in the Ok case.

This patch fixes both of these issues.
2025-07-23 15:24:49 +02:00
Benjamin Bouvier
cba711dbdf feat(timeline): add support for sending sticker/polls in thread automatically too 2025-07-23 15:05:23 +02:00
Benjamin Bouvier
e87e9331c1 feat!(timeline): infer the reply type automatically when sending a media gallery 2025-07-23 15:05:23 +02:00
Benjamin Bouvier
6e9fc70d13 refactor(timeline): homogeneize naming of replied_to vs in_reply_to 2025-07-23 15:05:23 +02:00
Benjamin Bouvier
e2148e46bc feat!(timeline): infer the reply type automatically when sending an attachment 2025-07-23 15:05:23 +02:00
Benjamin Bouvier
d1163b75bf feat!(timeline): Timeline::send_reply() automatically includes the thread relationship too 2025-07-23 15:05:23 +02:00
Benjamin Bouvier
5ae7d0f60f feat(timeline): Timeline::send() automatically includes the thread relationship for thread foci 2025-07-23 15:05:23 +02:00
Benjamin Bouvier
6f067d5510 doc(event cache): add a code comment indicating why room updates processing isn't happening concurrently 2025-07-23 11:21:09 +02:00
Benjamin Bouvier
d6fe654814 bench: add a benchmark for measuring the time it takes to handle a sync update in the event cache 2025-07-23 11:21:09 +02:00
Benjamin Bouvier
2710510786 refactor(base): use let chains where the comment said to do so \o/ 2025-07-23 09:57:50 +02:00
Benjamin Bouvier
35a8528712 chore(base): clippy fixes 2025-07-23 09:57:50 +02:00
Benjamin Bouvier
f9735c75d3 chore(base): rustfmt 2024 edition 2025-07-23 09:57:50 +02:00
Benjamin Bouvier
15e6b81835 chore(base): upgrade matrix-rust-sdk-base to edition 2024 2025-07-23 09:57:50 +02:00
Damir Jelić
bcb4ab4b10 contrib: Set our check command to check instead of clippy
Clippy is a bit too heavy to be used as the check on save command in
this repo.

Let's set a better default.
2025-07-22 15:20:37 +02:00
Kévin Commaille
4931c0749e Upgrade Ruma again
This patch updates our `Raw` API usage since the newly added `JsonCastable` that disallows Raw casts that are known to fail deserialization. 

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-22 12:59:26 +00:00
Kévin Commaille
37626b5ad9 Bump Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-07-22 14:00:53 +02:00
Benjamin Bouvier
d19616da03 chore!: bump the MSRV to 1.88
let-chains ftw
2025-07-22 12:15:33 +02:00
Ivan Enderlin
7c8f870d16 Revert "fix(sdk): Disable OrderTracker for the moment."
This reverts commit c5f2460e02.
2025-07-22 10:24:27 +02:00