Commit Graph

14300 Commits

Author SHA1 Message Date
Benjamin Bouvier aa4f606171 timeline: reorganize handle_reaction 2024-07-25 15:13:23 +02:00
Benjamin Bouvier 3a386121a1 timeline: remove Deref for ReactionGroup 2024-07-25 15:13:23 +02:00
Benjamin Bouvier 3d40a5c30c ffi: remove the Reaction::count field
It's exactly the same as `Reaction::senders`'s length.
2024-07-25 15:13:23 +02:00
Benjamin Bouvier 4c76255689 timeline: move reaction-related structs to the reaction module, move meta's reaction fields to the Reactions object
No changes in functionality, pure code motion.
2024-07-25 15:13:23 +02:00
Benjamin Bouvier 37d9fa784a timeline: clear more things in TimelineInnerMetadata when clearing the timeline 2024-07-25 15:13:23 +02:00
Benjamin Bouvier fa1cf32883 timeline: move the clearing of TimelineInnerMetadata to its own function 2024-07-25 15:13:23 +02:00
Benjamin Bouvier 002767a146 timeline: move the removal of reactions to pending_reactions 2024-07-25 15:13:23 +02:00
Benjamin Bouvier 5cd4462d27 dependencies: get rid of custom fork of openidconnect-rs
There's a published 4.0.0-alpha.2 version that compiles and doesn't
require the custom changes we needed.

Part of #3742.
2024-07-25 13:14:26 +02:00
Benjamin Bouvier 2eb6930988 send queue: add an own transaction id for dependent events
The previously named `transaction_id` is also renamed to
`parent_transaction_id` to make it clearer.
2024-07-24 17:54:25 +02:00
Benjamin Bouvier 0246863af3 send queue: make use of dependent events to remember an intent to edit/redact an event
This should get rid of most of the race conditions while
editing/redacting an event, and this paves the way for sending reactions
via the send queue.
2024-07-24 17:54:25 +02:00
Benjamin Bouvier d973fef280 send queue: add QueueStorage::client() helper method 2024-07-24 17:54:25 +02:00
Benjamin Bouvier 54c6f0517f send queue: canonicalize multiple dependent events into a more restricted list 2024-07-24 17:54:25 +02:00
Benjamin Bouvier 9a7f18c62c state store: add dependent queued events tables and operations 2024-07-24 17:54:25 +02:00
Damir Jelić f0ef37efae tests: Add tests for the cross-signing reset 2024-07-24 11:03:54 +02:00
Damir Jelić d9e91344aa examples: Update the cross-signing bootstrap example to use the new method 2024-07-24 11:03:54 +02:00
Damir Jelić 4883f3fa77 examples: Add a reset-cross-signing command to the oidc example 2024-07-24 11:03:54 +02:00
Damir Jelić 0d00bda0c6 encryption: Add a method to reset cross-signing keys 2024-07-24 11:03:54 +02:00
Damir Jelić 947a1b1aeb sdk: Refactor the way we determine which HTTP error is permannent 2024-07-24 11:03:54 +02:00
Andy Balaam ece0c6d703 crypto: Simplify error types in SenderDataFinder
Remove `Result` where it is not needed, and switch to `CryptoStoreError`
instead of `OlmError` where possible. Soon, this will allow us to call
some of these methods from places that don't know about `OlmError`.
2024-07-24 07:52:46 +01:00
Jorge Martín 79010af9e2 sdk-base: add pinned events to BaseRoomInfo to keep track of them.
Also add `Room::pinned_events(&self)` to get the current pinned events at any time.
2024-07-23 17:19:53 +02:00
Andy Balaam 99da0ff18d crypto: Simplify the interface of search_for_device 2024-07-23 15:03:19 +01:00
Andy Balaam 2045b326b9 crypto: Re-use existing get_device_from_curve_key method
These calls are equivalent because the old code called
`self.get_user_devices` with a `timeout` of `None`, which meant the call
to `wait_if_user_pending` inside was a no-op.
2024-07-23 14:56:47 +01:00
Doug dfdea0cb2e sdk: Ignore the sliding sync proxy value when using SSS.
Update crates/matrix-sdk/src/client/builder.rs

Co-authored-by: Benjamin Bouvier <public@benj.me>
Signed-off-by: Doug <6060466+pixlwave@users.noreply.github.com>
2024-07-23 11:34:49 +02:00
Doug 56e3780808 ffi: Use the SDK's (tested) logic for overriding the sliding sync proxy. 2024-07-23 11:34:49 +02:00
Benjamin Kampmann 96763aec42 sdk: Add a set_account_data method to the Room struct (#3740)
As it says on the tin. Needed the functions but they were missing. They are analogous to the GlobalAccountData setters.

Signed-off-by: Benjamin Kampmann <ben@acter.global>
2024-07-23 10:34:49 +02:00
Benjamin Bouvier 925c5b2233 workspace: update dependencies
Fixes #3744.
2024-07-22 15:01:06 +02:00
Benjamin Bouvier 5242f647f3 make_reply_event: don't require the event cache to be enabled for the API to work 2024-07-22 12:50:37 +02:00
Benjamin Bouvier ed2ab3ffe6 timeline: rename any_timeline_item_by_txn_id to item_by_transaction_id 2024-07-22 11:32:09 +02:00
Benjamin Bouvier 30c401ac75 timeline: rename item_by_transaction_id to local_item_by_transaction_id 2024-07-22 11:32:09 +02:00
Benjamin Bouvier bbae5364b3 timeline: update comments and error types for Timeline::redact
Yay, one fewer error type for the timeline.
2024-07-22 11:32:09 +02:00
Benjamin Bouvier ec057cf354 timeline: update comments around Timeline::edit 2024-07-22 11:32:09 +02:00
Benjamin Bouvier d4ad2b26cd timeline: remove unused error variants 2024-07-22 11:32:09 +02:00
Benjamin Bouvier 9b1b67fa09 timeline: rationalize edit/abort 2024-07-22 11:32:09 +02:00
Benjamin Bouvier 07f5289e7e release: Update Cargo.lock file 2024-07-22 10:57:25 +02:00
Damir Jelić d65e33ca6a Merge branch '0.7-release' into main matrix-sdk-ffi/20240722 2024-07-19 12:02:40 +02:00
Ivan Enderlin 730d5a3803 fix(base): Fix a bug when an invite has no timestamp.
The sliding sync proxy has a bug: despite the presence of
`m.room.create` in `bump_event_types`, an invite with an `m.room.create`
event will not have a `timestamp`. Thus, such a room cannot be sorted
reliably.

This patch fixes this problem with a terrible hack, where it tries to
find an `origin_server_ts` value from within the `invite_state` state
events.

Please read the comment to learn more.
2024-07-19 11:39:14 +02:00
Ivan Enderlin 23a232e99f fix(base): Add the from_simplified_sliding_sync argument to BaseClien::process_sliding_sync. 2024-07-19 11:39:14 +02:00
Damir Jelić 4f79a15fa9 qrcode: Bump the version 0.7.1-qrcode 2024-07-19 11:05:14 +02:00
Damir Jelić dda080c497 sqlite: Bump the version 0.7.1-sqlite 2024-07-19 10:18:27 +02:00
Damir Jelić 11d5e56892 chore: Fix a formatting issue that snuck in while doing a security release 2024-07-18 17:31:55 +02:00
Damir Jelić 8b0d6afe4b Merge branch '0.7-release' into main 2024-07-18 17:26:18 +02:00
Damir Jelić a18f90bfaa chore: Fix some invalid test data 0.7.2-crypto 2024-07-18 17:10:00 +02:00
Damir Jelić 60ed367fd9 chore: Format the changelog a bit better 2024-07-18 17:10:00 +02:00
Damir Jelić 1157067dba chore: Prepare the matrix-sdk-crypto release 0.7.2 2024-07-18 17:10:00 +02:00
Damir Jelić 8efdba6136 crypto: Fix UserIdentity::is_verified to take into account our own identity
The `UserIdentity::is_verified()` method in the matrix-sdk-crypto crate
before version 0.7.2 doesn't take into account the verification status
of the user's own identity while performing the check and may as a result
return a value contrary to what is implied by its name and documentation.

This patch fixes this and adds a regression test.

The method itself is not used internally and as such has not a larger
impact.

Co-authored-by: Denis Kasak <dkasak@termina.org.uk>
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2024-07-18 17:10:00 +02:00
Damir Jelić 1029e51eb3 chore: Use a released version of vodozemac (#3721) 2024-07-18 17:10:00 +02:00
Ivan Enderlin 5679a45f75 fix(ui): RoomList reacts to all RoomInfoNotableUpdate.
The `RoomList` provides a `Stream<Item = Vec<VectorDiff<Room>>>`.
This `Stream` receives updates from 2 sources: `RoomList::entries`,
and `Receiver<RoomInfoNotableUpdate>`. When a `RoomInfo` is
updated, a notable update is emitted and broadcasted. The
`RoomList` was filtering these notable updates by _reasons_ (namely
`RoomInfoNotableUpdateReasons`).

This is great and it's a good idea since we can filter which
`RoomInfoNotableUpdate` will trigger a `RoomList` update. However, too
many _reasons_ were hidden/implicit, and it creates several regressions
because (i) these _reasons_ were implicit, (ii) since the business rules
are not defined, there is no tests for that (not in this SDK, not in
apps like ElementX). It means we discover missing _reasons_ bug after
bug. It's not pleasant.

The reality is: we are in the middle of big changes, mostly with room
list client-side sorting and simplified sliding sync. We want to relax
a little bit. This patch then disable the feature _filter updates by
reasons_. The `RoomList` will update to all `RoomInfoNotableUpdate` for
the moment. We will get back to this optimisation later.
2024-07-18 16:29:45 +02:00
Damir Jelić 76a7052149 crypto: Fix UserIdentity::is_verified to take into account our own identity
The `UserIdentity::is_verified()` method in the matrix-sdk-crypto crate
before version 0.7.2 doesn't take into account the verification status
of the user's own identity while performing the check and may as a result
return a value contrary to what is implied by its name and documentation.

This patch fixes this and adds a regression test.

The method itself is not used internally and as such has not a larger
impact.

Co-authored-by: Denis Kasak <dkasak@termina.org.uk>
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2024-07-18 16:20:47 +02:00
Ivan Enderlin 2aecf2950d fix(sdk): Add m.room.create to bump_event_types for sliding sync.
This patch updates the `rev` of our `ruma`'s fork to match the latest
commit of our `feat-sss` branch, see
https://github.com/ruma/ruma/commit/f25b3220d0c3ece7720020ed180af4955a855402.
It adds `m.room.create` in the `bump_event_types` of a
`v4::SyncRequestList` (equivalent of a `v5::request::List`).
2024-07-18 10:43:55 +02:00
Doug 4bbb6bd60c ffi: Don't add a custom SS proxy in ClientBuilder when using SSS. 2024-07-18 09:48:53 +02:00