Commit Graph

6805 Commits

Author SHA1 Message Date
Benjamin Bouvier
bf754667d9 chore: get rid of Client::inherit_session
It does the same as `restore_session` now. Thanks @zecakeh for finding this out!
2023-08-03 14:10:32 +02:00
Nicolas Mauri
61d4d5b096 Fix an arithmetic overflow 2023-08-02 18:25:35 +02:00
Jonas Platte
ea03b821fd ffi: Use UniFFI fork with future cancellation support
Upstream PR: https://github.com/mozilla/uniffi-rs/pull/1684
2023-08-02 16:16:24 +02:00
Jonas Platte
f1b4b80460 ffi: Don't spawn tokio tasks for add_timeline_listener, send_attachment 2023-08-02 16:16:24 +02:00
Jonas Platte
b39d06353a Revert "ffi: Spawn tokio tasks for the remaining async fns"
This reverts commit eb4dab138e.
2023-08-02 16:16:24 +02:00
Jonas Platte
34be01ecf2 Revert "ffi: Remove async from a few functions"
This reverts commit fc3883d08e.
2023-08-02 16:16:24 +02:00
Jonas Platte
0f6dd644b5 Upgrade async-rx 2023-08-01 17:31:29 +02:00
Jonas Platte
7d9d600eda ui: Only lock TimelineInnerState once per back-pagination response 2023-08-01 17:31:29 +02:00
Jonas Platte
8ac0f099f6 ui: Exclude Debug implementation from coverage 2023-08-01 17:31:29 +02:00
Jonas Platte
640e5fbacf ffi: Use batched timeline subscription 2023-08-01 17:31:29 +02:00
Jonas Platte
9a8c6249bb ui: Add Timeline::subscribe_batched 2023-08-01 17:31:29 +02:00
Jonas Platte
a65cff01f7 ui: Create subscribe integration test sub-module 2023-08-01 17:31:29 +02:00
Benjamin Bouvier
80243615c4 chore(test): make the clear_with_echoes test more deterministic 2023-08-01 15:57:12 +02:00
Benjamin Bouvier
a6aaf164aa chore(sliding sync): add logs for the limited flag computation
This should help us debug issues with false negatives.
2023-08-01 15:57:12 +02:00
Benjamin Bouvier
ace282126f ffi(notifications): include full timeline event again in the NotificationEvent
The full timeline event contains both the timestamp (requested in #2361) and the sender id;
now the sender id for the invite can also be contained in there, minimizing the amount of copying we're doing in the
FFI code.

Fixes #2361.
2023-08-01 15:09:18 +02:00
Nicolas Mauri
6961a7fb36 Fix is_user_mention_enabled and is_room_mention_enabled (#2357)
* Fix is_user_mention_enabled, is_room_mention_enabled

* Fix: XXX comments in UnitTests

* Update comments

* UnitTests: code refactoring
2023-08-01 14:43:32 +02:00
Jonas Platte
f6d4357d52 Update Cargo.lock 2023-08-01 10:59:40 +02:00
Jonas Platte
d05bd4bf2d ui: Deduplicate in-reply-to fetching 2023-08-01 09:29:18 +02:00
Benjamin Bouvier
a00ff293f1 chore: apply code review suggestions again 2023-07-31 15:02:04 +02:00
Benjamin Bouvier
505267503b chore: add a comment explaining why we need a mutex 2023-07-31 15:02:04 +02:00
Benjamin Bouvier
c6f00cb633 chore(clippy): use an async mutex 2023-07-31 15:02:04 +02:00
Benjamin Bouvier
6cc4364684 chore: move comment around 2023-07-31 15:02:04 +02:00
Benjamin Bouvier
d165ec8646 feat: sequentialize calls to get_notification_with_sliding_sync
There must be at most one sliding sync notification per connection id. While we could use multiple ids, it seems bad
to do so, in terms of proxy performance; so this makes it so that there is at most once notification being handled
at a time.
2023-07-31 15:02:04 +02:00
Benjamin Bouvier
30a662fdc8 chore: slim down the enum variants of NotificationEvent according to popular request 2023-07-31 15:02:04 +02:00
Benjamin Bouvier
9126937901 feat: use /context query if sliding sync failed 2023-07-31 15:02:04 +02:00
Benjamin Bouvier
dec5c6bc2d feat(sliding sync): save the to-device token in OlmMachine::receive_sync_changes 2023-07-31 12:24:55 +02:00
Benjamin Bouvier
719683d284 feat: allow storing a next_batch_token in the crypto stores 2023-07-31 12:24:55 +02:00
Benjamin Bouvier
e3f7b9676d chore: fix Changes::is_empty() 2023-07-31 12:24:55 +02:00
Benjamin Bouvier
745bb09e38 chore: remove unused token in KeysQueryRequest 2023-07-31 12:24:55 +02:00
Benjamin Bouvier
4c4a77da34 chore: group all the arguments to receive_sync_changes in a single struct 2023-07-31 12:24:55 +02:00
Jonas Platte
33629833bd ui: Keep local echoes when clearing timeline
This is especially important for ones that failed to send (or ones that
fail post timeline clearing), since there is no way to retry them
otherwise.
2023-07-31 12:12:35 +02:00
Benjamin Bouvier
4c7e10cbf3 chore: add messages for base-client processing 2023-07-31 11:31:12 +02:00
Benjamin Bouvier
dcfea138ea chore: tweak sliding sync tracing context
- include the conn_id at the stream level, not the sync_once level (that's a child scope of the stream)\
- also include whether e2ee is enabled at this level
- shorten most static logs
- remove duplicate "sending request" logs
2023-07-31 11:31:12 +02:00
Benjamin Bouvier
eb7e01e8b1 chore: lower log-levels when processing sliding sync in sdk-base 2023-07-31 11:31:12 +02:00
Damir Jelić
c22f6da909 Add a js feature to the qrcode crate 2023-07-31 10:08:53 +02:00
Damir Jelić
4eba72774f Bump vodozemac 2023-07-31 10:08:53 +02:00
Jonas Platte
d149782e6a ui: Reuse ID when replacing UTD after retrying decryption 2023-07-31 09:53:58 +02:00
Jonas Platte
0c3d46eb1e ui: Move some functions into new timeline::util module 2023-07-31 09:53:58 +02:00
Jonas Platte
7dfe8cedbb ui: Move timeline item creation helpers into TimelineInnerState 2023-07-31 09:53:58 +02:00
Jonas Platte
e5f021f5cf ui: Simplify definition of TimelineEventHandler
Take a mutable reference to TimelineInnerState, instead of individual
mutable references to its fields.
2023-07-31 09:53:58 +02:00
Jonas Platte
05c5fdd839 ui: Move Flow into EventHandlerContext 2023-07-31 09:53:58 +02:00
Jonas Platte
c15ac3978e ui: Rename EventHandlerMetadata to EventHandlerContext 2023-07-31 09:53:58 +02:00
Jonas Platte
4b2cc20c6b ui: Move TimelineInner::*_internal to TimelineInnerState 2023-07-31 09:53:58 +02:00
Jonas Platte
18590c8813 ui: Move update_timeline_reaction to TimelineInnerState 2023-07-31 09:53:58 +02:00
Jonas Platte
b78abd62c0 ui: Move TimelineInnerState into its own module 2023-07-31 09:53:58 +02:00
Jonas Platte
b425812fd8 ui: Remove explicit default generic argument 2023-07-31 09:53:58 +02:00
Benjamin Bouvier
f57b6f5491 chore(test): don't use the same database name in multiple independent tests
This should make the test less flaky.
2023-07-28 19:17:01 +02:00
Benjamin Bouvier
18e283fee9 chore: add TODO explaining that this field should be put back into the OlmMachine later 2023-07-28 15:21:12 +02:00
Benjamin Bouvier
a3291a3627 fix: store the crypto store known generation in the Client, not the OlmMachine 2023-07-28 15:21:12 +02:00
Benjamin Bouvier
deb8434ee9 test: add a regression test for the spurious crypto store regeneration 2023-07-28 15:21:12 +02:00