Ivan Enderlin
5d356ca1b5
feat(sdk): Avoid locking prev_batch in SlidingSyncRoom::timeline_builder.
2023-02-22 19:59:57 +01:00
Ivan Enderlin
56daa6cb8f
chore(sdk): Rename SlidingSyncRoom pub(crate) from to pub(super) new.
...
First off, `SlidingSyncRoom.from` doesn't need to be visible to the entire
crate, only to `crate::sliding_sync.
Second, it's a constructor, so let's call it `new`.
2023-02-22 19:59:43 +01:00
Ivan Enderlin
1d02515186
chore(sdk): Re-organizing the code inside sliding_sync::room.
...
1. Put `FrozenSlidingSyncRoom` at the bottom of the module.
2. Put merge 2 `impl SlidingSyncRoom` together.
3. Remove the `AliveRoomTimeline` type alias.
4. Improve the documentation.
2023-02-22 17:38:37 +01:00
Ivan Enderlin
0abef77408
doc(sdk): Improve documentation of SlidingSyncBuilder.
2023-02-22 17:29:40 +01:00
Ivan Enderlin
5a62ec3fc1
chore(ffi) Rename StoppableSpawn to TaskHandle
...
chore(ffi) Rename `StoppableSpawn` to `TaskHandle`
2023-02-22 17:11:36 +01:00
Ivan Enderlin
cfcafc8425
chore(ffi) Rename StoppableSpawn to TaskHandle.
...
Because it is what it is.
2023-02-22 16:48:46 +01:00
kegsay
7e64c15145
fix: look for the right list when waiting for updates
...
Otherwise it will time out after 30s and then continue executing,
causing a slow test.
2023-02-22 14:42:32 +00:00
Jonas Platte
95f1867816
chore: Delete sled-state-inspector
...
The sled store is on its way out and nobody is using this.
2023-02-22 13:17:01 +01:00
Jonas Platte
b1062a67e0
fix(sdk): Rewrite decryption retrying to fix invalid index bug
...
Previously, it was possible for us to use invalid indices when:
- We retried decrypting multiple events at once
- One of them (not the last) was an edit or reaction
This lead to a situation where we would remove the UTD item once
decryption for it was successfully retried, but not account for the
resulting index shift for all later timeline items.
2023-02-22 12:44:11 +01:00
Janne Heß
02a213c1b5
feat(sdk): Add support to change display names of devices
...
Signed-off-by: Janne Heß <janne.hess@helsinki-systems.de >
2023-02-22 10:55:54 +00:00
Archit Bhonsle
64ec5ec561
feat(crypto): Expose and re-expose the version of the matrix-sdk-crypto crate
2023-02-22 10:21:48 +00:00
Ivan Enderlin
1469e9033c
feat(crypto-nodejs): OlmMachine.initialize takes a new optional store type
...
feat(crypto-nodejs): `OlmMachine.initialize` takes a new optional store type
2023-02-22 10:33:26 +01:00
Archit Bhonsle
ae4ed2e7c8
feat(crypto): Re-expose the version of vodozemac
2023-02-22 09:45:25 +01:00
Damir Jelić
655d7d00d0
chore(crypto): Add support for encrypted m.dummy events
...
This mostly just silences an incorrect log warning that we received an unsupported event.
Co-authored-by: Jonas Platte <jplatte@matrix.org >
2023-02-21 14:33:14 +01:00
Jonas Platte
ac5b439249
chore(sdk): Add an extra trace event to TimelineEventHandler::add
2023-02-21 12:11:03 +01:00
Jonas Platte
f76bc16a10
fix(sdk): Lock timeline state once for decryption retrying
...
Before, we were releasing the lock and re-obtaining it between obtaining
item indices and using them for decryption retrying.
2023-02-21 12:11:03 +01:00
Jonas Platte
a89a12701a
refactor(sdk): Remove unneeded Arc around MutableVec
2023-02-21 10:20:11 +01:00
Jonas Platte
843fe6a239
refactor(sdk): Remove derive_builder
2023-02-21 10:20:11 +01:00
Jonas Platte
cb06feea22
refactor(sled): Remove derive_builder
...
… and use owned Builder pattern like for Client.
2023-02-21 10:20:11 +01:00
Jonas Platte
b0e7f3d031
refactor(indexeddb): Remove derive_builder
...
… and use owned Builder pattern like for Client.
2023-02-21 10:20:11 +01:00
Jonas Platte
b96532878b
refactor(sdk): Replace futures-signals with eyeball-im in the timeline
2023-02-20 18:01:31 +01:00
Ivan Enderlin
b439d60b1f
feat(sdk): SlidingSyncView.state, .rooms_list and .rooms_count are now private
...
feat(sdk): `SlidingSyncView.state`, `.rooms_list` and `.rooms_count` are now private
2023-02-20 16:25:02 +01:00
Ivan Enderlin
e8af3e2d60
chore(clippy): Make Clippy happy.
2023-02-20 15:39:23 +01:00
Ivan Enderlin
1f3b8048c7
chore(jack-in): Use the latest SS API.
2023-02-20 15:39:23 +01:00
Ivan Enderlin
48257ac7cd
test(sdk): SS integration test suites use the new API.
2023-02-20 15:39:23 +01:00
Matteo Ludwig
dffc65007c
feat(bindings): Add AudioInfo & AudioMessageContent to matrix-sdk-ffi
...
Signed-off-by: Matteo Ludwig <ludwig@silpion.de >
2023-02-20 14:01:06 +00:00
Ivan Enderlin
3796469a29
doc(sdk): Fix Sliding Sync examples.
2023-02-20 14:24:38 +01:00
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