Commit Graph

258 Commits

Author SHA1 Message Date
Kévin Commaille da2abccc0d chore: Disable clippy::assigning_clones lint
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-04-02 15:05:41 +02: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
Andy Balaam ca13be020c build: Make wiremock a workspace dependency 2024-03-19 09:39:31 +00: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
Andy Balaam 7b7ee980e8 build: Update minimum supported Rust version to 1.76
This reflects the reality of the situation at the moment: we need 1.76.
to compile, and Ruma requires 1.75.
2024-03-18 11:45:02 +01:00
Ivan Enderlin b0880996fc
fix(ruma): Add the `compat-tag-info` feature.
This patch enables the `compat-tag-info` feature on Ruma, so that
`TagInfo::order` can be deserialized from both a `f64` or a `string`
representing a `f64`[^1].

[^1]: f24cae17f5/crates/ruma-events/src/tag.rs (L180-L185)
2024-03-13 10:24:18 +01: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
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 c41f7975b3 labs: turn rrrepl into a timeline client 2024-03-08 16:08:29 +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
Damir Jelić 47a4f473a6 Bump vodozemac
This adds more detailed logging for Olm messages
2024-02-06 16:17:05 +01:00
Stefan Ceriu 471b470c01
Change where `unstable-msc2867` is enabled, try to fix CI tests 2024-02-05 11:59:31 +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
Jonas Platte 0be2747ccf Use new crates.io release of UniFFI 2024-01-25 16:25:55 +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 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
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
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 315e6c9d85 Use workspace dependencies for matrix-sdk-test 2024-01-05 12:58:54 +01:00
Jonas Platte 1c7bf820bf Use workspace dependencies for crates/* dependencies
… except from examples (such that they remain copy-pastable).
2024-01-04 10:02:07 +01:00
Damir Jelić 18d69f7515 Add a ChannelObservable 2023-11-24 17:53:33 +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
Jonas Platte 6472ba5109 Upgrade UniFFI 2023-11-20 11:43:05 +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 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
Kévin Commaille 7e1eaddf5d
Bump tracing in cargo manifest
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-10-31 11:18:44 +00:00
Jonas Platte 686fc99ebd sdk: 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
Stefan Ceriu 0006f85103 Make `reldbg` inherit `dbg` and contain debug symbols 2023-10-23 15:31:22 +02:00
Timo 4933a50496
Add active calls to RoomInfo 2023-10-23 15:05:12 +02:00
Benjamin Bouvier 41a26e30e9 oidc: use sha2 to hash everything oidc-related
Hashes computed by `compute_session_hash` may be stored in the crypto store, and may or may not
be encrypted; make them slightly more secure by using a more secure hash. Also use sha2 for
the logged hashes that are useful for debugging OIDC issues.
2023-10-13 11:06:08 +02:00
Jonas Platte 4e86954008 Upgrade async-compat 2023-10-11 15:21:18 +02:00
Jonas Platte 4b98d24230 Upgrade UniFFI 2023-10-11 15:21:18 +02:00
Damir Jelić 6c9cfe1368 Bump our vodozemac version 2023-10-06 16:19:03 +02:00
Jonas Platte 7576a73fcb Upgrade Ruma to latest crates.io release 2023-10-05 17:46:34 +02:00
Marco Romano 0158422dcd
Bump ruma
- Bumps ruma to include https://github.com/ruma/ruma/pull/1665
- Enables ruma `compat-arbitrary-length-ids` flag instead of using the now deprecated `lax-id-validation`
2023-09-28 14:01:18 +02:00
Jonas Platte 454304a20d Enable eyeball's tracing feature 2023-09-21 19:12:01 +02:00
Jonas Platte 1a15802201 Upgrade Ruma 2023-09-20 14:19:06 +02:00
Jonas Platte 52ce2eed23 Upgrade eyeball, eyeball-im-util
Pulls in an important bug fix for the Limit adapter.
2023-09-19 11:35:18 +02:00
Jonas Platte 0504eafc0a Upgrade most dependencies 2023-09-18 19:56:06 +02:00
Marco Romano 3bad812ff8
Use new poll event replacement types
* Bump ruma
* Use new ruma types for UnstablePollStartEventContent
* Use from/into for UnstablePollStartEventContent.
2023-09-18 11:03:41 +02:00
Ivan Enderlin db1125d427
chore(cargo): Back to regular `eyeball`. 2023-09-15 15:02:04 +02:00
Ivan Enderlin d12eda5839
feat(ui): `RoomList` provides entries that are limited.
For some room lists, the number of entries can be gigantic. For example,
some accounts have 800, 2500, or even 4000 rooms! It's not necessary for
the client/app to display all the 4000 rooms. First, it can create some
performance issues, second, nobody will scroll 4000 rooms to search for
a particular room :-). Such users are more likely to use a search bar or
something equivalent. The idea is that `RoomListService` will continue
to sync all the data, but only a _limited_ version of it will be shared
to the client/app.

This patch takes `RoomList::entries_with_dynamic_filter`, and improves
it to include this (dynamic) limit.

This patch renames `RoomList::entries_with_dynamic_filter`
to `::entries_with_dynamic_adapters`. It now returns a
`RoomListDynamicEntriesController`, which is a renaming of
`DynamicRoomListFilter`. Basically, the “dynamic filter” becomes a
“dynamic controller” because `RoomList::entries_with_dynamic_adapters`
manages more than a filter. It now uses
`eyeball_im_util::vector::DynamicLimit` to dynamically limit the size
of entries. And that's the major idea behind this patch.

`RoomListDynamicEntriesController::set` is renamed `::set_filter`, and 2
new methods are introduced: `add_one_page` and `reset_to_one_page`.

A _page_ is like a chunk of room entries we want to view or add. When
doing `next_page`, the limit increases to `old_limit + page_size`. The
`reset_pages` method resets the `limit` to `page_size` only.
2023-09-15 13:34:20 +02:00
Jonas Platte 1cbcee4fea Use as_variant crate for shorter code 2023-09-13 18:33:33 +02:00
Jonas Platte a4101e2f45 Upgrade Ruma 2023-09-12 17:19:56 +02:00