Ivan Enderlin
d49ceddfd5
feat(sdk): SlidingSyncView.state, .rooms_list and .rooms_count are now private.
...
Before this patch, `SlidingSyncView` has the following fields that were public:
`state`, `rooms_list` and `rooms_count`. Since they are `Mutable`, they can be
changed from the outside, and then will break the internal state of the view.
This problem is mentioned in https://github.com/matrix-org/matrix-rust-sdk/
issues/1474.
This patch solves this by making them prviate. Phew. That was simple!
But wait, we have a problem now. `matrix-sdk-ffi` was relying on them. So
this patch adds “helpers” methods on `SlidingSyncView`, like `state_stream`,
`rooms_list`, `rooms_list_stream`, `rooms_count` and `rooms_count_stream`.
Let's add new ones when it's necessary.
2023-02-20 14:22:42 +01:00
Ivan Enderlin
03c3f66c9a
doc(sdk): Fix Sliding Sync examples.
2023-02-20 14:20:22 +01:00
Ivan Enderlin
7b06822687
chore(sdk): Group impl blocks for the same SlidingSyncView in a single impl block.
2023-02-20 14:15:20 +01:00
Jonas Platte
1f128c1dd6
refactor(sdk): Remove Mutable<_> around SlidingSyncView#sync_mode
2023-02-20 13:20:33 +01:00
Jonas Platte
e92841d6bc
refactor(sdk): Inline Mutable type aliases
2023-02-20 13:20:33 +01:00
Jonas Platte
a112076664
refactor(sdk): Remove usage of MutableBTreeMap
...
No instance was ever subscribed to, so we can just use a regular shared RwLock.
2023-02-20 13:20:33 +01:00
Jonas Platte
2f9106a6d0
refactor(sdk): Make SlidingSync fields private
2023-02-20 13:20:33 +01:00
Ivan Enderlin
8a70df80b2
doc(sdk): Fix Sliding Sync module documentation.
...
doc(sdk): Fix Sliding Sync module documentation.
2023-02-20 12:23:10 +01:00
Jonas Platte
cbcfd5d531
refactor(bindings): Fix SlidingSyncRoom timeline listener return type
...
It's an error if the room was not found, so it should be surfaced as such.
2023-02-20 12:10:13 +01:00
Ivan Enderlin
b451460d8d
doc(sdk): Improve Sliding Sync documentation
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2023-02-20 12:06:20 +01:00
Ivan Enderlin
772a94cc8c
doc(sdk): Fix Sliding Sync module documentation.
2023-02-20 11:49:35 +01:00
Jonas Platte
0f077ffcd3
fix(sdk): Don't overwrite parallel updates when fetching reply details
2023-02-20 11:15:23 +01:00
Jonas Platte
9eefe9377e
refactor(sdk): Move timeline functionality into TimelineInner
2023-02-20 11:15:23 +01:00
Ivan Enderlin
b35f2669d2
chore(sdk): Split the sliding_sync module into smaller ones
...
chore(sdk): Split the `sliding_sync` module into smaller ones
2023-02-20 11:09:05 +01:00
Ivan Enderlin
4102d25ebe
chore(sdk): Split the sliding_sync module into smaller ones.
...
It's an strict copy-paste. Nothing has changed, except the
`SlidingSyncConfigBuilder::subscriptions` method that is now public within
the crate.
2023-02-20 10:43:05 +01:00
Ivan Enderlin
177fa140fc
fix(sdk): FrozenSlidingSyncRoom.timeline_queue must serialize to timeline
...
fix(sdk): `FrozenSlidingSyncRoom.timeline_queue` must serialize to `timeline`
2023-02-17 19:46:50 +01:00
Ivan Enderlin
e0eeba21ff
fix(sdk): FrozenSlidingSyncRoom.timeline_queue must serialize to timeline.
...
In https://github.com/matrix-org/matrix-rust-sdk/pull/1478 , I've introduced
a regression. The FrozenSlidingSyncRoom.timeline` field has been renamed to
`timeline_queue`.
I didn't notice that this type can be serialized and deserialized. That's
actually a breaking change because this type is stored somewhere once
serialized. So with #1478 , it was impossible to deserialize them!
This patch fixes that. It also adds a test to ensure the serialization form of
`FrozenSlidingSyncRoom` doesn't change.
2023-02-17 19:24:39 +01:00
Jonas Platte
e4f94f3174
chore: Fix warnings
2023-02-17 11:30:13 +01:00
Jonas Platte
c2f529ed71
chore: Run cargo update
...
To pull in the latest Ruma release with a bugfix for content reporting.
2023-02-17 11:30:13 +01:00
Jonas Platte
0b91ec29a4
Allow to get or send any type of receipt
2023-02-17 10:54:03 +01:00
Kévin Commaille
362a394a11
feat(sdk)!: Allow to send private read receipts and receipts in threads
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-17 10:33:09 +01:00
Kévin Commaille
6ddb22d6ab
feat(sdk): Expose methods to get a user or an event's receipts
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-17 10:29:22 +01:00
Kévin Commaille
a3f289c6fc
feat(base)!: Allow to get any receipt type for a user or event
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-17 10:29:21 +01:00
Jonas Platte
44d8f99bc4
docs(sdk): Remove outdated documentation
2023-02-17 09:56:29 +01:00
Ivan Enderlin
eb3fb6986d
doc(sdk): Fix links to examples and to matrix_sdk_base
...
doc(sdk): Fix links to examples and to `matrix_sdk_base`
2023-02-17 08:53:00 +01:00
Ivan Enderlin
b6fb25fdfa
test(sliding-sync): ensure unknown pos does recover the room subscription properly
...
test(sliding-sync): ensure unknown pos does recover the room subscription properly
2023-02-16 18:24:17 +01:00
Mauro
679d3084aa
feat(bindings): Add Room::report_content
2023-02-16 17:18:18 +00:00
Ivan Enderlin
94b60f915f
test(sdk): Address feedbacks.
2023-02-16 17:54:28 +01:00
Ivan Enderlin
3bf1060705
Merge branch 'main' into ben-fix-resubscribe-problem
2023-02-16 17:44:26 +01:00
Damir Jelić
9649100adb
feat(sdk): Add a root span to our client
2023-02-16 15:31:38 +01:00
Damir Jelić
292a9831f5
refactor(crypto): Move the usage specific cross signing types into the types module
2023-02-16 14:39:07 +01:00
Damir Jelić
04d8348477
refactor(crypto): Split out the cross signing key handling method
2023-02-16 14:39:07 +01:00
Ivan Enderlin
7049bd9183
doc(sdk): Improve Sliding Sync documentation
...
Sliding Sync API docs & minor fixes around API accessibility
2023-02-16 14:12:45 +01:00
Ivan Enderlin
1c7ffedf1a
Merge branch 'main' into ben-sliding-sync-docs
2023-02-16 14:00:56 +01:00
Ivan Enderlin
7cc06cb76d
chore(sdk): Small cleans up when reading the Sliding Sync code
...
chore(sdk): Small cleans up when reading the Sliding Sync code
2023-02-16 13:38:04 +01:00
Ivan Enderlin
9479f23f4b
fix(sdk): Reconciliate events in the timeline queue in Sliding Sync when new updates arrive
...
fix(sdk): Reconciliate events in the timeline queue in Sliding Sync when new updates arrive
2023-02-16 12:35:35 +01:00
Ivan Enderlin
c719d6d22e
doc(sdk): Fix links to examples and to matrix_sdk_base.
2023-02-16 12:08:42 +01:00
Ivan Enderlin
6aa766efd0
chore(sdk): Address PR feedback.
2023-02-16 11:58:07 +01:00
Richard van der Hoff
a0807cb337
crypto-js: support npm run build:dev ( #1510 )
...
Building the crypto-js bindings in release mode is very slow and not really
necessary for local development.
`--release` is the default, so there is no need to specify it
explicitly. Instead, allow `wasm-pack` args to be specified by an env var, and
add a `build:debug` npm script which will build in debug mode.
2023-02-16 10:51:37 +00:00
Richard van der Hoff
480800b996
crypto-js: have share_room_key return ToDeviceRequests ( #1516 )
...
We already have support for proper `ToDeviceRequest` objects in
`outgoing_requests`, so let's use it in `share_room_key` as well. It's much
easier for the application to work with the proper object than an untyped json
blob.
2023-02-16 10:51:15 +00:00
Ivan Enderlin
1c0288e42b
chore(sdk): Simplify code by removing a map.
...
In the code `if let Some(global_data) = account_data.as_ref().map(|a|
&a.global)`, the `map` is not purely necessary. This patch simplifies the code
to remove the `map` and read the `global` field later on.
2023-02-16 11:49:21 +01:00
Ivan Enderlin
0a97ac8316
chore(sdk): Address PR feedback.
2023-02-16 11:45:10 +01:00
Ivan Enderlin
46006cf108
chore(sdk): Address PR feedback.
2023-02-16 11:43:25 +01:00
Ivan Enderlin
10adb6d26b
chore(sdk): Use appropriate type to remove the need of a comment.
...
By using `Default::default` for the parameter value, we don't know which type
we are passing to the function. Hence the useful comment `room_info.ephemeral`.
This patch changes this to `Ephemeral::default`, so that we now know what we
pass without the need of a comment.
2023-02-16 11:23:05 +01:00
Richard van der Hoff
5abab932db
ci: Fail coverage job if the coverage report can't be uploaded ( #1515 )
2023-02-16 09:36:43 +00:00
Damir Jelić
abef9fae1a
chore(bindings): Use tracing-android instead of android-logger
2023-02-16 09:59:16 +01:00
Ivan Enderlin
b05d6874c0
test(sdk): Update the timeline inspection when the timeline_limit is modified.
2023-02-16 09:49:36 +01:00
Jonas Platte
3f2b12c996
chore(base): Remove unused futures-channel dependency
2023-02-16 08:59:41 +01:00
Ivan Enderlin
838488702f
Merge branch 'main' into test-sliding-sync-timeline-limit-duplication
2023-02-16 08:45:22 +01:00
Ivan Enderlin
6c62b5f637
test(sdk): Restore the sliding-sync Docker image to v0.99.0.
2023-02-16 08:16:03 +01:00