Commit Graph

135 Commits

Author SHA1 Message Date
Jonas Platte
e5f4bbdc47 Upgrade dependencies 2023-04-24 13:59:01 +02:00
Jonas Platte
7ab14d9428 Enable Ruma's compat-user-id feature 2023-04-24 12:42:03 +02:00
Jonas Platte
d527dd37b1 Upgrade Ruma 2023-04-24 12:42:03 +02:00
Jonas Platte
7e58e72671 Upgrade UniFFI 2023-04-20 18:24:47 +02:00
Jonas Platte
bb05ac7dac ffi: Add basic tracing bindings 2023-04-20 11:43:45 +02:00
Jonas Platte
86930581a5 Upgrade Ruma 2023-04-18 13:14:33 +02:00
Damir Jelić
316b29c95f Merge branch 'main' into valere/msc_2399 2023-04-13 10:59:05 +02:00
Jonas Platte
29255781cc Fix comments in Cargo.toml 2023-04-06 15:49:09 +02:00
Damir Jelić
81e2725b6f Remove DirectWithheldCode 2023-04-04 13:30:29 +02:00
Jonas Platte
6878f52885 Upgrade UniFFI 2023-03-30 21:53:02 +02:00
Jonas Platte
d680b331d0 Make tokio a workspace dependency 2023-03-28 21:08:57 +02:00
Jonas Platte
72ae9dd885 Upgrade eyeball-im 2023-03-20 16:51:28 +01:00
Kévin Commaille
aebd5fe4eb sdk: Fix timeline highlight test
Update Ruma to fix the server default push rules.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-03-14 14:02:01 +01:00
Jonas Platte
e9058f58be Upgrade Ruma 2023-03-13 16:31:19 +01:00
Alfonso Grillo
786e9b5db9 Add createRoom UniFFI binding 2023-03-13 15:33:18 +01:00
Jonas Platte
cc35ee72b8 Upgrade eyeball to 0.4.0 2023-03-11 13:13:50 +01:00
Ivan Enderlin
c517f38ec8 sliding-sync: process receipt extension response
sliding-sync: process receipt extension response
2023-03-08 16:29:56 +01:00
Jonas Platte
68f8ed5a92 Add futures-util as a workspace dependency
… and always activate its `alloc` feature.
Fixes building matrix-sdk without the e2e-encryption feature.
2023-03-08 15:03:20 +01:00
Kegan Dougal
48bf20fcca Add integration test for receipts in sliding sync 2023-03-08 12:53:23 +00:00
Jonas Platte
7af2bea2fc Upgrade UniFFI 2023-03-08 11:12:11 +01:00
Ivan Enderlin
46d71acb44 chore: Update ruma to a specific revision. 2023-03-08 08:56:38 +01:00
Ivan Enderlin
9f0563eb95 feat(sdk): SlidingSync::stream can match expected responses.
This patch adds a new feature.

Each call to `SlidingSync::stream` generates a unique `stream_id`. This
`stream_id` is passed to requests as a `txn_id` field. Returned responses must
hold the same `txn_id`, otherwise it means `stream` has received unexpected
responses from another `stream` or something else.

So far, when the `txn_id` field of the response and the `stream_id` don't
match, a log with the `ERROR` level is raised. Should we do more, like ignoring
the response entirely? Not sure yet.
2023-03-08 08:56:32 +01:00
Jonas Platte
d06e8ccfc5 refactor: Upgrade eyeball and use SharedObservable
… but not in sliding sync yet, where some planned refactorings might
conflict with this.
2023-02-27 13:29:28 +01:00
Anderas
f0986643ce chore(crypto): Log Olm session identifiers
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
2023-02-27 10:59:30 +01:00
Jonas Platte
17b86b7c38 refactor(crypto): Replace futures-signals with eyeball 2023-02-23 11:47:51 +01:00
Jonas Platte
b96532878b refactor(sdk): Replace futures-signals with eyeball-im in the timeline 2023-02-20 18:01:31 +01:00
Jonas Platte
efdeba79f9 chore: Upgrade workspace dependencies 2023-02-08 16:04:29 +01:00
Jonas Platte
ce973b35e9 chore: Upgrade uniffi to 0.23.0 2023-02-02 10:15:05 +01:00
Benjamin Kampmann
14be1f888a test(sliding-sync): integration test for UnknownPos 2023-01-31 15:02:19 +00:00
Benjamin Kampmann
5b3ec33ddc chore: Update to specific, supported ruma and sliding-sync-proxy-version. 2023-01-31 14:03:43 +00:00
Benjamin Kampmann
9ad34e8565 chore(sliding-sync): update to latest sliding-sync JSON layout 2023-01-31 14:03:43 +00:00
Jonas Platte
0e39a7cbf2 chore: Upgrade Ruma 2023-01-25 18:01:12 +01:00
Damir Jelić
4ef654f1d1 chore: Bump the Ruma version 2023-01-25 18:01:12 +01:00
Jonas Platte
6c53842599 chore: Bump ruma, vodozemac 2023-01-16 10:34:06 +01:00
Kévin Commaille
f883293168 chore: Update Ruma
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-01-11 16:05:02 +01:00
Jonas Platte
f4bfbdf97d chore: Upgrade base64 2023-01-10 10:19:02 +01:00
Jonas Platte
2e30e11101 refactor: Use workspace dependencies for more crates 2023-01-10 10:19:02 +01:00
Matthew Hodgson
b026d90bcf fix(sdk): Handle to-device sliding sync extension correctly
Co-authored-by: Jonas Platte <jplatte@matrix.org>
2023-01-02 18:00:38 +00:00
Jonas Platte
a5080b6ed9 chore: Upgrade Ruma 2022-12-19 13:50:02 +01:00
Jonas Platte
34d458d3a3 chore: Upgrade UniFFI 2022-12-14 12:03:13 +01:00
Jonas Platte
3d22b6d5a4 chore: Upgrade Ruma 2022-11-29 15:37:18 +01:00
Benjamin Kampmann
d3ff402813 feat(sliding-sync): Offline caching for Sliding Sync & session recovery (#1193)
With these changes, the user of sliding sync can configure the SlidingSync-Builder to store and recover the state from storage. For that they should call cold_cache("my-sliding-sync-key") with their preferred storage location during setup time on SlidingSyncBuilder. If a cached version is found under that key, the internal state of the rooms-list as well as each view found (identified by their name) will be set from storage immediately - allowing the user to show the last cached state. The Builder then also uses the same key to store its latest state after every update received from remote.

👉 Note on room list:
As we store a disconnected state, we are saving all RoomList entries as either Empty or Invalidated. This allows for an easier updating when the server comes back with results, as we don't track the ranges in cache - in the view of the server, we haven't seen anything yet.

👉 Note on timeline events:
This does store all existing timeline events - initial and seen during the session (as we keep track of them right now) - and will recover that state. However, as we can't be sure wether we have gaps in the timeline, the timeline items are reset upon receiving updates for them from the server.

👉 Note on (full-sync-)view:
While we are caching the server returned results (view list, room count and room info) as is, we are not caching the internal state (whether we are catching up) nor the ranges (as they are likely to be out of date) - those will be acting the same way you configured them, just with preloaded results. So for a full-sync-view, it will still do requests in batches and replace the corresponding set of rooms. Which could mean you might see the same room appear twice, though the cached one would be marked as invalidated. This might be problematic if the list the UI shows is longer than the batches fetched, but would be resolved quickly when catching up.

👉 On recovery:
When the sliding sync receives a M_UNKNOWN_POS, indicating the server has expired our session, sliding sync now transparently retries with up to three times to restart the sliding sync with full set of extensions and the latest views at their existing windows, the current room state is held. For full sync this starts a new sync-up with the existing room list staying intact. This also works from the offline at start.
2022-11-28 18:01:04 +00:00
Jonas Platte
c3aa03e486 chore: Add reldbg profile and use it for matrix-sdk-ffi iOS builds 2022-11-16 09:59:06 +01:00
Jonas Platte
51798e90bd chore: Add dbg profile and improve profile comments 2022-11-16 09:59:06 +01:00
Jonas Platte
826705c174 chore: Bump MSRV to 1.65 2022-11-15 14:57:46 +01:00
Jonas Platte
4dc0e0ef3c chore: Upgrade Ruma 2022-11-14 15:01:53 +01:00
Jonas Platte
99e621a82b chore: Upgrade UniFFI 2022-11-03 09:48:41 +01:00
Jonas Platte
a6ca114bac chore: Upgrade UniFFI 2022-11-02 16:21:16 +01:00
Jonas Platte
eddf202a76 chore: Upgrade UniFFI 2022-10-27 11:27:28 +02:00
Jonas Platte
01dc166293 chore: Upgrade UniFFI 2022-10-20 12:53:09 +02:00