Commit Graph

394 Commits

Author SHA1 Message Date
Jonas Platte
18eefcffdb Move matrix-sdk-crypto enum definitions out of UDL 2024-01-27 00:31:42 +01:00
Doug
be8be9ef04 sdk: Add uniffi scaffolding. 2024-01-26 11:36:34 +01:00
Jonas Platte
0be2747ccf Use new crates.io release of UniFFI 2024-01-25 16:25:55 +01:00
Ivan Enderlin
eec52d7977 chore: Update Ruma to 684ffc
chore: Update Ruma to 684ffc
2024-01-22 15:13:01 +01:00
Ivan Enderlin
eab35c1289 chore: Update Ruma to 684ffc.
This patch updates Ruma to the latest commit on its `main` branch.

This is useful for https://github.com/matrix-org/matrix-rust-sdk/issues/2932.
2024-01-22 13:42:00 +01:00
Benjamin Bouvier
1d6c01fb34 Bump matrix-sdk to 0.7.1 2024-01-22 11:56:58 +01:00
Benjamin Bouvier
b680c50035 labs: introduce rrrrepl, a client specialized for showing and sending read receipts
This was quite handy during development of the client-side computation of read-receipts, to analyze some bugs.

It might be not useful to have it checked in for long, but I would love to make sure it keeps on compiling
until we have a more stable handling of read receipts in general.
2024-01-22 11:01:26 +01:00
dependabot[bot]
9f0a1e0ce7 build(deps): bump h2 from 0.3.22 to 0.3.24
---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-19 17:54:43 +01:00
Kévin Commaille
b3f4e658c5 base-client: Support notifications in invited rooms (#2907)
Necessary for the `.m.rule.invite_for_me` rule that should only happen in invited rooms.

Requires to create a `Notification` type that accepts stripped state events. It is simpler than Ruma's type because it lacks fields with data that is made up or redundant.

Tested locally with Fractal.

Fixes #1912.

---

* Upgrade Ruma

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* base-client: Support notifications in invited rooms

Necessary for the .m.rule.invite_for_me rule that should
only happen in invited rooms.
Requires to create a Notification type that accepts stripped state
events.
It also removes fields with data that is made up or redundant.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* matrix-sdk-test: Add macros to construct raw sync or stripped state events

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* client: Add tests for register_notification_handler

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Upgrade Ruma

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Fix base changelog

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Fix methods on Room

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Fix FFI

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Fix FFI RoomMember

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

* Simplify and_then chain

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>

---------

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-01-19 10:30:35 +00:00
Sami J. Mäkinen
147f1d3f6c Upgrade aquamarine dependency 2024-01-14 11:20:12 +00:00
Jonas Platte
f08e978540 Upgrade uniffi
… and specify a version such that publishing of the ui crate becomes possible.

We still use a git dependency for FFI crate builds because there were some
likely important breaking changes that haven't been released.

This is required to publish `matrix-sdk-ui`.
2024-01-05 14:03:44 +01:00
Jonas Platte
40b09cda2f Bump all of the versions to 0.7.0 2024-01-05 12:58:54 +01:00
Jonas Platte
eb33c3754a bindings: Move matrix_sdk_ui enum definitions out of UDL 2024-01-04 17:14:44 +01:00
Benjamin Bouvier
96b427a332 Add test showing the spurious room info update 2024-01-04 11:41:50 +01:00
Jonas Platte
c4724c082e Upgrade dependencies 2024-01-02 19:12:42 +01:00
Benjamin Bouvier
843fcac3c1 read receipts: don't clone cached events for computing the read receipt state
Before this patch, we needed to clone the inner `timeline_queue` and turn it into a concrete `Vec<SyncTimelineEvent>`, just to iterate on the elements,
and because returning an iterator from a trait method is impractical. This now changes it to return the actual concrete type of `timeline_queue`, so
we don't need the extra allocations.

Ideally, matrix-sdk and matrix-sdk-base would be merged, so we don't need to use a trait at all here.
2023-12-21 11:55:29 +01:00
Benjamin Bouvier
09e355a7bc read receipts: add integration tests for read receipts 2023-12-21 11:55:29 +01:00
dependabot[bot]
614bf942c0 build(deps): bump zerocopy from 0.7.26 to 0.7.31
Bumps [zerocopy](https://github.com/google/zerocopy) from 0.7.26 to 0.7.31.
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/compare/v0.7.26...v0.7.31)

---
updated-dependencies:
- dependency-name: zerocopy
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 10:39:21 +01:00
Jonas Platte
e652069896 sdk: Use crates.io release of mas-oidc-client 2023-12-07 17:34:36 +01:00
Damir Jelić
ac5a9e106b Move the FailuresCache into the common crate 2023-11-30 16:20:51 +01:00
Richard van der Hoff
1fcd5af526 indexeddb: Update storage for inbound_group_sessions (#2885)
Currently, querying for inbound group sessions which need backing up is very
inefficient: we have to search through the whole list.

Here, we change the way they are stored so that we can maintain an index of the
ones that need a backup.

Fixes: https://github.com/vector-im/element-web/issues/26488
Fixes: https://github.com/matrix-org/matrix-rust-sdk/issues/2877

---

* indexeddb: Update storage for inbound_group_sessions

Currently, querying for inbound group sessions which need backing up is very
inefficient: we have to search through the whole list.

Here, we change the way they are stored so that we can maintain an index of the
ones that need a backup.

* Rename functions for clarity

* Remove spurious log line

This was a bit verbose

* Rename constants for i_g_s store names

* improve log messages

* add a warning

* Rename `InboundGroupSessionIndexedDbObject.data`

* formatting
2023-11-30 12:01:20 +01:00
Damir Jelić
b38f501902 Add an example for the room key backup support 2023-11-24 17:59:00 +01:00
Damir Jelić
18d69f7515 Add a ChannelObservable 2023-11-24 17:53:33 +01:00
Jonas Platte
b277423237 sdk: Upgrade mas-oicd-client 2023-11-24 15:01:17 +01:00
Jonas Platte
4621dd4317 ffi: Upgrade opentelemetry 2023-11-24 15:01:17 +01:00
Jonas Platte
17797da71a indexeddb: Upgrade dependencies 2023-11-24 15:01:17 +01:00
Jonas Platte
eec4227dfc sdk: Upgrade async-related dependencies 2023-11-24 15:01:17 +01:00
Jonas Platte
64ddfd872c sqlite: Upgrade rusqlite / deadpool-sqlite 2023-11-24 15:01:17 +01:00
Jonas Platte
19a990ad41 Update Cargo.lock
The reqwest update is held back to avoid linking issues on iOS.
2023-11-24 15:01:17 +01:00
Jonas Platte
53ad6f5fe5 Upgrade itertools 2023-11-24 15:01:17 +01:00
Jonas Platte
8038414de2 Raise minimum version for Ruma
Otherwise the matrix-sdk crate can be used with an older version of
ruma-client-api which uses different types for a sliding sync type.

The sliding sync breaking change was allowed to be part of a patch
release because sliding sync is an unstable feature in Ruma.
2023-11-24 15:01:17 +01:00
Benjamin Bouvier
844340e0f7 sliding sync: fix unsetting the avatar in a sliding sync room
The meaning of "null" and "undefined" were conflated by Ruma, previously. This updates to the latest Ruma, which changed the `avatar` type from
`Option` to `JsOption` and thus allowed us to distinguish both cases: `null` means the avatar has been unset, `undefined` means it's not changed
since the previous request.
2023-11-21 14:50:04 +01:00
Jonas Platte
6472ba5109 Upgrade UniFFI 2023-11-20 11:43:05 +01:00
Jonas Platte
bfd2a1c445 Upgrade ruma crates to pull in bugfixes
Includes the following bugfixes:

- Fix the name of the fallback text field for extensible events in
  `RoomMessageEventContentWithoutRelation::make_reply_to_raw()`
- Allow to deserialize `(New)ConditionalPushRule` with a missing `conditions`
  field
- Fix deserialization of `claim_keys` responses without a `failures` field
2023-11-16 11:06:19 +01:00
Alfonso Grillo
4a428b4731 Update ruma-events 2023-11-15 11:49:42 +01:00
Damir Jelić
955d611aaa Bump our deps so we pull in the new release of ruma-client-api 2023-11-09 17:40:03 +01:00
Jonas Platte
91c4bc0b3e Upgrade tracing-opentelemetry 2023-11-06 18:41:48 +01:00
Jonas Platte
6f710063b5 Upgrade mas-oidc-client 2023-11-06 18:41:48 +01:00
Damir Jelić
2e20f00d99 Add an example for the secret storage support 2023-11-06 10:41:44 +01:00
Damir Jelić
e599fa1ccf Add secret storage support to the main SDK crate 2023-11-06 10:41:44 +01:00
Marco Romano
6a27fc2e04 Upgrade uniffi
This will include https://github.com/mozilla/uniffi-rs/pull/1781
Which fixes https://github.com/mozilla/uniffi-rs/issues/1760
2023-11-03 10:19:20 +01:00
Jonas Platte
4485abbfdf Replace all two uses of async-std with equivalent tokio functionality 2023-11-02 17:21:48 +01:00
Jonas Platte
7be84ca71a test: Deduplicate tracing_subscriber initialization
… and set a sensible default log level.
2023-11-02 12:58:03 +01:00
Benjamin Bouvier
8de33f68f3 integration tests: randomize user names better
In the previous situation, running the tests with `cargo test` would sometimes fail because despite appending the number of milliseconds since
the start of epoch to the user names, some user names would clash across different tests, leading to unexpected results. This fixes it by using
an actual RNG in there, so the names don't ever clash.
2023-11-01 07:57:46 +01:00
Benjamin Bouvier
1f534821f6 Bump tracing 2023-10-30 14:34:56 +01:00
Jonas Platte
686fc99ebd sdk: Replace dashmap usage by std types 2023-10-27 13:53:26 +02:00
Jonas Platte
113bdbd835 base: Replace dashmap usage by std types 2023-10-27 13:53:26 +02:00
Jonas Platte
05a1021724 Use assert_let! instead of assert_matches! with bindings 2023-10-26 17:29:29 +02:00
Timo
4933a50496 Add active calls to RoomInfo 2023-10-23 15:05:12 +02:00
Benjamin Bouvier
6368c699c2 test: Merge the two integration test suites into a single one 2023-10-23 13:55:42 +02:00