Kévin Commaille
c252b984e0
refactor(sdk): Use a builder pattern to construct Timeline
...
`Timeline::with_fully_read_tracking` was public although all public
Timeline constructors enable it by default.
It is also meant to be called when constructing the timeline so
using a builder pattern makes sense.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-08 10:46:59 +01:00
Jonas Platte
ee9d47f647
refactor(crypto): Remove confusing explicit Sized bound
...
The bound is there by default, no need to put it in explicitly.
2023-02-07 18:45:32 +01:00
Jonas Platte
2e80073f28
refactor(crypto): Use IntoCryptoStore for OlmMachine::with_store
2023-02-07 18:45:32 +01:00
Jonas Platte
c3d5932a0f
refactor(crypto): Move store::{CryptoStoreError, Result} into new module
2023-02-07 18:45:32 +01:00
Doug
7fdccfcea4
chore(bindings): Rename property and use feature flag.
2023-02-07 15:22:39 +00:00
Doug
630836b3c7
chore(bindings): Store the proxy URL directly in Client.
2023-02-07 15:22:39 +00:00
Doug
3705925a22
chore(bindings): Persist the sliding sync proxy.
...
Added to the Session for automatic restoration.
2023-02-07 15:22:39 +00:00
Doug
b7a3ab7c5b
feat(ffi): Sliding sync proxy discovery.
2023-02-07 15:22:39 +00:00
Jonas Platte
5692480112
refactor(crypto): Remove unused method
2023-02-07 15:59:19 +01:00
Jonas Platte
5b63bd4cf1
refactor(crypto): Reduce direct visibility of some internal types
...
They weren't being exported from any public modules before.
This helps human readers as well as some compiler lints.
2023-02-07 15:59:19 +01:00
Jonas Platte
9711e1b2f5
refactor(crypto): Move (Into)CryptoStore traits into a new module
2023-02-07 15:59:19 +01:00
Damir Jelić
a17346158f
docs(sdk): Fix the sliding sync builder example
2023-02-07 14:26:33 +01:00
Damir Jelić
30ddbab686
refactor(sdk): Move the bulk of the sliding sync logic into a sync_once method
2023-02-07 14:26:33 +01:00
Jonas Platte
b436918cb3
fix(sqlite): Fix Debug output for SqliteCryptoStore
2023-02-06 17:08:21 +01:00
Jonas Platte
b20424b8b5
chore(sqlite): Undo weird formatting of TOML file
2023-02-06 17:08:21 +01:00
Ivan Enderlin
5f933b1033
feat(sdk): Simplify code by using std::cmp::min
...
feat(sdk): Simplify code by using `std::cmp::min`
2023-02-06 14:46:46 +01:00
Ivan Enderlin
5e8224f19c
feat(sdk): Simplify code by using std::cmp::min.
2023-02-06 13:43:01 +01:00
Damir Jelić
e68134dd53
chore(crypto): Improve the logs for the OlmMachine constructor
2023-02-06 13:31:00 +01:00
Damir Jelić
945c16a7fb
feat(crypto): Throw an error if our user/device pair isn't what we have in the store
2023-02-06 13:31:00 +01:00
dependabot[bot]
fc8cd2e7e5
chore(deps): bump tokio from 1.24.1 to 1.24.2
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.24.1 to 1.24.2.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/commits )
---
updated-dependencies:
- dependency-name: tokio
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2023-02-04 08:27:50 +01:00
Damir Jelić
4115975135
fix(bindings): Expose the OpenTelemetry logging for other platforms as well
2023-02-03 22:30:11 +01:00
Damir Jelić
35a26be7b0
chore(sdk): Record the sliding sync pos in our logs
2023-02-03 16:51:33 +01:00
Jonas Platte
052832b4d3
fix: Don't log raw events that fail deserialization
...
… but do log relevant parts to allow debugging.
2023-02-03 14:35:10 +01:00
Richard van der Hoff
e516e15d2b
matrix-sdk-crypto-js v0.1.0-alpha.4
matrix-sdk-crypto-js-v0.1.0-alpha.4
2023-02-03 12:17:37 +01:00
Ivan Enderlin
2bc9407563
feat(sdk): Remove SlidingSyncView.rooms
...
feat(sdk): Remove `SlidingSyncView.rooms`
2023-02-03 11:51:25 +01:00
Jonas Platte
47f8b6cb79
feat(ffi): Add Room::fetch_members
2023-02-02 17:48:26 +01:00
Jonas Platte
e11dd099d8
feat(sdk): Add Timeline::fetch_members
2023-02-02 17:48:26 +01:00
Jonas Platte
c294a376e8
refactor(sdk): Use TimelineDetails for sender profile
2023-02-02 17:48:26 +01:00
Jonas Platte
ffa0190517
refactor(sdk): Add missing feature-gate
...
… for fn that is only used from sliding-sync.
2023-02-02 17:48:26 +01:00
Jonas Platte
3a863fa8fb
refactor(sdk): Remove unnecessary inner block in function
2023-02-02 17:48:26 +01:00
Ivan Enderlin
672a640854
chore(labs): Update to later changes.
2023-02-02 15:27:18 +01:00
Ivan Enderlin
40010cd511
Merge branch 'main' into feat-sliding-sync-view-rooms
2023-02-02 15:26:30 +01:00
Ivan Enderlin
a6d33fcd16
feat(labs): Update jack-in to the new sliding sync room API.
2023-02-02 15:22:41 +01:00
Ivan Enderlin
d08606e3b9
feat(sdk): SlidingSync::get_room now takes a ref to OwnedRoomId
...
feat(sdk): `SlidingSync::get_room` now takes a ref to `OwnedRoomId`.
2023-02-02 14:06:14 +01:00
Ivan Enderlin
ae8a8c6cc3
feat(sdk): SldingSync::get_room takes a &RoomId.
2023-02-02 13:36:32 +01:00
Ivan Enderlin
0d87d0f786
feat(sdk): Remove SlidingSyncView.rooms.
...
`SlidingSyncView` exposes a `room` field. Problem: It's not updated
correctly and leads to error. The canonical way to get a room is by using
`SlidingSync::get_room`. This patch thus removes `SlidingSyncView.rooms`
entirely.
2023-02-02 13:31:46 +01:00
Ivan Enderlin
a9ba2dd546
feat(sdk): SlidingSync::get_room now takes a ref to OwnedRoomId.
...
Before this patch, `SlidingSync::get_room` was taking ownership of an
`OwnedRoomId`, to only use it as a reference. Thus, calling this method was
creating useless clones.
This patch updates `SlidingSync::get_room` to receive a reference to
`OwnedRoomId`.
2023-02-02 13:25:36 +01:00
Kévin Commaille
00638ba74c
feat(sdk): Allow to fetch replied to messages
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-02 13:06:11 +01:00
Jonas Platte
ce973b35e9
chore: Upgrade uniffi to 0.23.0
matrix-sdk-crypto-ffi-0.2.0
2023-02-02 10:15:05 +01:00
Jonas Platte
8a1b1eccd6
doc(sdk): Fix docs that refer to TimelineKey
2023-02-02 10:15:05 +01:00
Jonas Platte
e068b4987e
doc(sdk): Document what happens when timeline event sending fails
2023-02-02 10:14:23 +01:00
Jonas Platte
3a1eb62c38
refactor(sdk): Expose event sending errors through timeline item
...
… instead of through the return value of Timeline::send.
2023-02-02 10:14:23 +01:00
Jonas Platte
c8021cf2ba
refactor(sdk): Move LocalEventTimelineItem#event_id into send_state
2023-02-02 10:14:23 +01:00
Jonas Platte
a48fd77c4a
refactor(sdk): Rename LocalEventTimelineItemSendState => EventSendState
2023-02-02 10:14:23 +01:00
Damir Jelić
ab0e27622e
feat(bindings): Add support to setup a OpenTracing based logger
2023-02-01 22:55:47 +01:00
Damir Jelić
7b044ef5dd
fix(crypto): Ignore the usage and signatures when comparing cross signing keys
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2023-02-01 18:25:48 +01:00
Anderas
e9cef35f99
Add matrix-sdk-sqlite with a CryptoStore implementation
...
Note about "Write-Ahead Log" (WAL) mode: The SQLite WAL mode has a
bunch of advantages that are quite nice to have:
1. WAL is significantly faster in most scenarios.
2. WAL provides more concurrency as readers do not block writers and a
writer does not block readers. Reading and writing can proceed
concurrently.
3. Disk I/O operations tends to be more sequential using WAL.
4. WAL uses many fewer fsync() operations and is thus less vulnerable
to problems on systems where the fsync() system call is broken.
The downsides of WAL mode don't really affect us. So let's turn it on.
More info: https://www.sqlite.org/wal.html
Co-authored-by: Jonas Platte <jplatte@matrix.org >
Co-authored-by: Damir Jelić <poljar@termina.org.uk >
2023-02-01 15:06:59 +01:00
Damir Jelić
3a183b4c22
chore(sdk): Tweak the instrumentation for some encryption related methods
matrix-sdk-crypto-ffi-0.1.10
2023-02-01 10:16:14 +01:00
Richard van der Hoff
5dbee7dcdc
fix(indexeddb): correctly encode Olm session keys
...
When we store an Olm session in the database, we encode the sender key and
session ID using the store cipher. That means that we also need to encode them
when we look them up, otherwise we won't find them.
2023-01-31 16:59:22 +01:00
Benjamin Kampmann
b9b00743c9
fix(sliding-sync): catching up on new count for full-sync views
2023-01-31 15:02:19 +00:00