Commit Graph

7615 Commits

Author SHA1 Message Date
Jonas Platte
1609a73e99 sdk: Update argument order for send_raw 2023-10-31 11:13:25 +01:00
Jonas Platte
8f108d4064 sdk: Fix tracing span field "encrypted" in send_raw 2023-10-31 11:13:25 +01:00
Jonas Platte
463a02a4ef sdk: Make transaction_id truly optional for send and send_raw
… by removing the parameter and returning a named future with a
builder-style `with_transaction_id` method.
2023-10-31 11:13:25 +01:00
Jonas Platte
8a1506206b sdk: Clean up logging in send_raw 2023-10-31 11:13:25 +01:00
Jonas Platte
4b702da8e8 Make IntoFuture implementations a little easier to read and write 2023-10-31 11:13:25 +01:00
Jonas Platte
18b714116e sdk: Stop re-exporting named futures in regular modules
Instead make futures modules part of the API. It is extremely uncommon
to actually refer to a type that implements `Future` by its name / path,
so it's better if these don't show up in documentation pages that are
already large and somewhat cluttered.
2023-10-31 11:13:25 +01:00
Benjamin Bouvier
380735ab46 crypto: put the KeyQueryManager in the IdentityManager 2023-10-31 10:42:14 +01:00
Benjamin Bouvier
4158d00fac crypto: rename KeyQueryManager::tracked_user_loading_lock to loaded_tracked_users 2023-10-31 10:42:14 +01:00
Benjamin Bouvier
56aff649c5 crypto: introduce a KeyQueryManager 2023-10-31 10:42:14 +01:00
Benjamin Bouvier
f945a50d22 Update crates/matrix-sdk-ui/src/timeline/mod.rs 2023-10-30 16:37:03 +01:00
Kévin Commaille
901518d745 Merge compare_receipts and pub_or_priv_receipt into a more generic method
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-10-30 16:37:03 +01:00
Kévin Commaille
1fe4bff05c Improve docs
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-10-30 16:37:03 +01:00
Kévin Commaille
3690bdd6a1 ui: Add regression test for clearing read receipts
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-10-30 16:37:03 +01:00
Kévin Commaille
70eb400d11 ui: Add method to know the position in the timeline of a user read receipt
Even if the event it applies to is not visible

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-10-30 16:37:03 +01:00
Kévin Commaille
1c602a8919 ui: Clear all read receipts maps
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-10-30 16:37:03 +01:00
Benjamin Bouvier
e4ec8f03eb crypto: remove useless fallibility of StoreTransaction::new 2023-10-30 16:08:06 +01:00
Benjamin Bouvier
597cff5d9d crypto: make it impossible to have two Accounts alive at the same time 2023-10-30 16:08:06 +01:00
Daniel Abramov
7dde4ec1e8 widget: Add reading of message-like events 2023-10-30 14:41:21 +01:00
Daniel Abramov
0f420a61dc widget: Add tests for non-allowed matrix requests 2023-10-30 14:41:21 +01:00
Benjamin Bouvier
9d5e7c59f3 Fix tracing timer API so it works with updated tracing 2023-10-30 14:34:56 +01:00
Benjamin Bouvier
1f534821f6 Bump tracing 2023-10-30 14:34:56 +01:00
Jonas Platte
245c102169 examples: Add required clap feature for example-timeline 2023-10-30 12:26:34 +01:00
Benjamin Bouvier
1da785e6cb fix(crypto): upload device keys *before* sending the keys signature during XSigning bootstrapping
There was a bug previously, that the cross-signing bootstrapping could include a signature for a device key that hadn't been uploaded yet.
This fixes it by returning a third (!) request in `bootstrap_cross_signing`, that must be sent as the second in order, and will upload
keys, if required.

Also tweaks documentation. Fixes #2749.
2023-10-27 16:22:24 +02:00
Benjamin Bouvier
f917b32407 crypto: remove useless async in a few functions 2023-10-27 16:22:24 +02:00
Benjamin Bouvier
631ab26d8b Rename some variables in crypto related to cross-signing bootstrapping 2023-10-27 16:22:24 +02:00
Benjamin Bouvier
0f442b4c83 crypto: don't use a transaction when it can be avoided
The transaction is useless since the account is used in read-only mode here.
2023-10-27 16:22:24 +02:00
Richard van der Hoff
0c333ed335 Refactor olm message decryption logic (#2751)
The driver for this is really to make sure that we log a warning whenever there is an error, but tbh IMHO the result is somewhat easier to understand.
2023-10-27 12:57:18 +01:00
Jonas Platte
28c4f2dc14 base: Inline MemoryStore inherent methods into StateStore impl block
They were not used anywhere else and had no reason to exist as inherent
methods.
2023-10-27 13:53:26 +02:00
Jonas Platte
686fc99ebd sdk: Replace dashmap usage by std types 2023-10-27 13:53:26 +02:00
Jonas Platte
113bdbd835 base: Replace dashmap usage by std types 2023-10-27 13:53:26 +02:00
Benjamin Bouvier
1d90dd554c Test some verification getters in the heavyweight verification integration test 2023-10-27 13:03:20 +02:00
Jonas Platte
05a1021724 Use assert_let! instead of assert_matches! with bindings 2023-10-26 17:29:29 +02:00
Jonas Platte
23571d0257 ui: Replace qualified path with use 2023-10-26 17:29:29 +02:00
Benjamin Bouvier
c533297efd test: move the mocked endpoints into their own functions
Code-motion only.
2023-10-26 17:10:57 +02:00
Benjamin Bouvier
870faa48d1 tests: add mutual verification test 2023-10-26 15:12:34 +02:00
Jonas Platte
a515bc8f03 ffi: Remove tokio::Runtime::block_on usage in async fn 2023-10-25 16:16:58 +02:00
Jonas Platte
bc81cc317f ui: Log event type when an event fails to deserialize 2023-10-25 15:15:09 +02:00
Stefan Ceriu
570ef38de3 Remove unused anyhow import 2023-10-24 17:00:08 +02:00
Benjamin Bouvier
468337f026 Update bindings/matrix-sdk-ffi/src/session_verification.rs 2023-10-24 17:00:08 +02:00
Stefan Ceriu
040d095a04 Change the is_verified flag source to device.is_cross_signed_by_owner as theoretically the previous implementation was wrong 2023-10-24 17:00:08 +02:00
Stefan Ceriu
fa90269e7e Fixes vector-im/element-x-ios/issues/1868 - Incorrect is_verified flag after successfully running verification flow
- the inner user_identity isn't automatically updated when the flow finishes, needs to be fetched again from encryption
2023-10-24 17:00:08 +02:00
Benjamin Bouvier
93edf7a064 tests: add test for cross-signing bootstrapping and unchecked self-verification 2023-10-24 15:20:15 +02:00
Jonas Platte
79065edabf ui: Test next_event_limit for different pagination strategies 2023-10-24 14:04:07 +02:00
Jonas Platte
cd1e3928ad ui: Exclude another Debug impl from coverage reporting 2023-10-24 14:04:07 +02:00
Jonas Platte
61335af40d widget: Add a test for receiving live events 2023-10-24 12:58:39 +02:00
Jonas Platte
a0128a94ef base: Log when the same sync response is received twice 2023-10-24 12:58:39 +02:00
Damir Jelić
95ced18edd Implement Default for the CrossSigningKeyExport
Co-authored-by: Jonas Platte <jplatte@matrix.org>
2023-10-24 11:23:45 +02:00
Damir Jelić
cd310d52d4 Add a convenience method to check if we have all cross-signing keys 2023-10-24 11:23:45 +02:00
Damir Jelić
dc92ce8b40 Add a convenience method to get your own device out of the store 2023-10-24 11:23:45 +02:00
Daniel Abramov
b0aa0ec5de widget: Add unit test to cover possible "deadlock" 2023-10-23 22:31:56 +02:00