Commit Graph

440 Commits

Author SHA1 Message Date
Damir Jelić
afa3808752 chore: Use the released version of Ruma 2024-05-09 17:34:16 +02:00
Damir Jelić
121dedee4e chore: Use a released version of vodozemac 2024-05-06 15:24:21 +02:00
Damir Jelić
8eebb9bb39 chore: Use a released version of uniffi (#3382)
The commit we were using has been part of the 0.27.1 release, so let's
use it:

789a9023b5
2024-05-06 14:32:47 +02:00
Ivan Enderlin
12a231675c chore(ffi): Remove support for opentelemetry.
This patch removes support for OpenTelemetry because it's not used
anymore by anybody. It also adds multiple duplicated dependencies (like
`reqwest`). Anyway. Farewell.
2024-05-03 19:52:17 +02:00
Damir Jelić
56aa86da8b chore: Depend on a released version of mas-oidc-client 2024-05-02 17:12:19 +02:00
Ivan Enderlin
ad2e8336f6 fix(store-encryption): Remove the displaydoc dep.
This patch removes the `displaydoc` dependency. Why?

1. It creates a warning in rustc nightly:

```
warning: non-local `impl` definition, they should be avoided as they go against expectation
  --> crates/matrix-sdk-store-encryption/src/lib.rs:49:17
   |
49 | #[derive(Debug, Display, thiserror::Error)]
   |                 ^^^^^^^
   |
   = help: move this `impl` block outside the of the current constant `_DERIVE_Display_FOR_Error`
   = note: an `impl` definition is non-local if it is nested inside an item and may impact type checking outside of that item. This can be the case if neither the trait or the self type are at the same nesting level as the `impl`
   = note: one exception to the rule are anon-const (`const _: () = { ... }`) at top-level module and anon-const at the same nesting as the trait or type
   = note: this lint may become deny-by-default in the edition 2024 and higher, see the tracking issue <https://github.com/rust-lang/rust/issues/120363>
   = note: the derive macro `Display` may come from an old version of the `displaydoc` crate, try updating your dependency with `cargo update -p displaydoc`
   = note: `#[warn(non_local_definitions)]` on by default
   = note: this warning originates in the derive macro `Display` (in Nightly builds, run with -Z macro-backtrace for more info)
```

2. `thiserror` is already used, which seems to provide a similar issue.
3. That's less dependency, and less proc-macro, which will improve the
   compilation time in general.
2024-05-02 09:27:17 +02:00
Kévin Commaille
b4c3ab38b8 chore: Upgrade more crates
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-30 20:05:34 +02:00
Kévin Commaille
5eaf10e9f8 chore: Upgrade base64 crate
This matches the version used in ruma and vodozemac

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-30 17:46:59 +02:00
Damir Jelić
fb9982fb48 oidc: Use the correct types to compare the status codes in the oidc example (#3363) 2024-04-30 13:02:29 +00:00
Kévin Commaille
856dd01009 Upgrade http, ruma, reqwest and wiremock dependencies (#3362)
They need to be updated together
because the latters depend on the former.

matrix-authentication-service is still using http 0.2
so we need to add a conversion layer between both major versions
for OIDC requests.

We need to update vodozemac too because of a dependency resolution issue.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-30 14:04:56 +02:00
Kévin Commaille
ea1a01000f sdk: Use the GET /auth_issuer endpoint for OIDC
The well-known method is deprecated.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-30 12:33:31 +02:00
Kévin Commaille
0e0a406cb1 Replace hyper with axum for oidc_cli example
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-27 19:37:46 +02:00
Kévin Commaille
04e5643422 Lock axum to 0.7.4
Version 0.7.5 triggers a warning in
our version of rust nightly in CI,
but we can't update it to a recent
version because it triggers a warning
caused by displaydoc

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-27 18:34:37 +02:00
Kévin Commaille
d2bb17acd5 sdk: Replace hyper with axum for SSO login
hyper::Server was dropped in hyper 1, without a replacement.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-27 17:12:10 +02:00
Benjamin Bouvier
bd65c77534 dependencies: use a fork of Ruma for the time being 2024-04-22 14:55:47 +02:00
dependabot[bot]
a157f2eb97 chore(deps): bump rustls from 0.21.10 to 0.21.11
Bumps [rustls](https://github.com/rustls/rustls) from 0.21.10 to 0.21.11.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.21.10...v/0.21.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 19:53:20 +00:00
Kévin Commaille
88c4dec35f sdk: Upgrade image crate
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-11 11:40:32 +02:00
Kévin Commaille
6d9aa14ccd qrcode: Upgrade qrcode crate
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-11 11:40:32 +02:00
dependabot[bot]
2f5d8c212a chore(deps): bump h2 from 0.3.24 to 0.3.26
Bumps [h2](https://github.com/hyperium/h2) from 0.3.24 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](https://github.com/hyperium/h2/compare/v0.3.24...v0.3.26)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-08 15:20:10 +02:00
Benjamin Bouvier
4744a994b4 integration tests: enhance testing of test_room_notification_count
This adds additional checks for each room updates, and works around a few race conditions, notably one where the server would send a remote echo for a message, but not update the
computed unread_notification_counts immediately. This tends to make the test more stable, in that each response is well known and now properly tested.
2024-03-25 18:03:18 +01:00
Hubert Chathi
8d968604e9 chore: Update Ruma to version that uses web-time crate (#3264) 2024-03-22 12:30:19 +01:00
Richard van der Hoff
97959bbcd0 crypto: Log details about olm session after encryption/decryption (#3242) 2024-03-22 09:43:35 +00:00
Hubert Chathi
1e35188aec Add a dehydrated flag to device_keys of dehydrated devices (#3164)
Signed-off-by: Hubert Chathi <hubert@uhoreg.ca>
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
2024-03-19 14:33:13 +00:00
Benjamin Bouvier
c6da40cf55 ffi: bump opentelemetry crates
This gets rid of multiple duplicate crates in the dependency tree.
2024-03-19 14:21:59 +01:00
Kévin Commaille
0ff9e066fb sdk: Don't enable default features of mas-oidc-client
We don't need the `hyper` feature as we use our own HTTP client,
and the `keystore` will not be used in most cases.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-19 14:01:53 +01:00
Samy Djemaï
baf97c69b1 chore: upgrade uniffi-rs to latest commit
Signed-off-by: Samy Djemaï <53857555+SamyDjemai@users.noreply.github.com>
2024-03-19 10:37:26 +01:00
Timo Kösters
2f58cb1620 members: Simplify disambiguation logic when loading member list (#3184)
When all room members are loaded, we do not need an incremental member update. We know that parsing the /members response will only lead to more ambiguous names, not less. And because /members returns the complete list, we can directly use that list as the disambiguation map.

This improves the performance in my emulator from 56s to 9s and on a less performant device from 11mins to 11s (Tested experimentally on Matrix HQ using log statements in element android. If I have time, I will write a proper benchmark tomorrow.

See also https://github.com/matrix-org/matrix-rust-sdk/pull/3184#issuecomment-1986170631 for a more detailed benchmark run.

---

* members: Simplify disambiguation logic

* members: Prevent api misuse for receive_members

* members: Benchmark receive_all_members performance

* sdk: remove unused import

* sdk-base: rename `ApiMisuse` error to `InvalidReceiveMembersParameters`

* benchmarks: extract the member loading benchmark to `room_bench.rs`

* benchmarks: remove wiremock

* sdk-base: fix format

* sdk-base: try fixing tests

* benchmark: Provide some data to the store so the search and disambiguation happen

* benchmark: fix clippy

* benchmark: use a constant for `MEMBERS_IN_ROOM`

* sdk(style): reduce indent in `receive_all_members`

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: Benjamin Bouvier <public@benj.me>
2024-03-12 10:15:30 +00:00
Ivan Enderlin
3edaff1364 Merge pull request #3178 from matrix-org/ex-tui
labs: turn `rrrepl` into a timeline client
2024-03-11 14:53:35 +01:00
Richard van der Hoff
1ea163271b crypto: Include event timestamp in decryption failure logs
Co-authored-by: Benjamin Bouvier <public@benj.me>
Signed-off-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-03-11 13:16:39 +01:00
Kévin Commaille
fd709b9d52 workspace: Bump ruma crate
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-03-09 15:18:46 +01:00
Benjamin Bouvier
4ad79d6d44 multiverse: hide the password by using rpassword to prompt it 2024-03-08 17:44:55 +01:00
Benjamin Bouvier
c41f7975b3 labs: turn rrrepl into a timeline client 2024-03-08 16:08:29 +01:00
dependabot[bot]
98a68632df chore(deps): bump mio from 0.8.10 to 0.8.11
Bumps [mio](https://github.com/tokio-rs/mio) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/tokio-rs/mio/releases)
- [Changelog](https://github.com/tokio-rs/mio/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/mio/compare/v0.8.10...v0.8.11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-05 10:42:26 +01:00
Jorge Martín
7b40daa3cf ffi: bump the UniFFi referenced commit again
At the moment, the SDK can't be built for Android because of these 2 issues:

- https://github.com/mozilla/uniffi-rs/issues/1996
- https://github.com/mozilla/uniffi-rs/issues/1995

Those have been fixed in the new commit.
2024-03-01 13:59:12 +01:00
Stefan Ceriu
8392ef07cd ffi: bump uniffi to latest git rev to generate open swift classes 2024-02-28 18:46:26 +01:00
Timo Kösters
79f97504f8 sliding_sync: Refactor delayed decryption test
Signed-off-by: Timo Kösters <timo@koesters.xyz>
2024-02-12 14:48:35 +01:00
Timo Kösters
910887fbc6 sliding_sync: Add test for delayed decryption roominfo updates
Signed-off-by: Timo Kösters <timo@koesters.xyz>
2024-02-12 14:48:35 +01:00
Ivan Enderlin
fd716bcd81 feat(base): Add the NotableTags type.
This patch is the first step to remove the [`RoomNotableTags`] API. The
idea is to compute the notable tags as a single 8-bit unsigned integer
(`u8`) and to store it inside `RoomInfo`. The benefits are numerous:

1. The type is smaller that `RoomNotableTags`,
2. It's part of `RoomInfo` so:
  - We don't need an async API to fetch the tags from the store and to
    compute the notable tags,
  - It can be put in the store,
  - The observable/subscribe mechanism is supported by `RoomInfo` behind
    observable instead of introducing a new subscribe mechanism.
2024-02-08 15:14:03 +01:00
Doug
099bf9c929 sdk: Add RoomPowerLevelSettings.
fix: Preserve the event of any settings that are changed back to the default level.

sdk: Rename get_room_power_levels (drop the get).

chore: Refactor with more sensible naming.

sdk: Clean up the RoomPowerLevelChanges API.
2024-02-07 14:49:03 +00:00
Damir Jelić
5957d9603b Move back to reqwest 0.11.20
The linking error[1] on Mac still isn't fixed.

[1]: https://github.com/seanmonstar/reqwest/issues/2006
2024-02-07 13:57:07 +01:00
Damir Jelić
14246c7094 Update our lock file
The Dalek crates got a new release fixing some build issues on nightly.
This should get rid of those build issues.
2024-02-07 13:57:07 +01:00
Damir Jelić
47a4f473a6 Bump vodozemac
This adds more detailed logging for Olm messages
2024-02-06 16:17:05 +01:00
Stefan Ceriu
56d9f9d9a8 Add support for MSC2867 - Manually marking rooms as unread
- also fixes how room account data is processed and adds tests for both when rooms and extensions are present or just extensions
2024-02-05 11:59:29 +01:00
Andy Balaam
f64af126f1 Merge pull request #3073 from matrix-org/andybalaam/shrink-inbound_group_sessions
indexeddb: Shrink values in inbound_group_sessions store, improving performance all around
2024-01-31 12:29:31 +00:00
Andy Balaam
e3ba3366f1 indexeddb: Shrink values in inbound_group_sessions store 2024-01-31 11:59:46 +00:00
ganfra
cde6a559ad tags : exposes RoomNotableTags directly from the sdk-base crate 2024-01-30 16:46:43 +01:00
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