Commit Graph

1468 Commits

Author SHA1 Message Date
Valere
748c3d514a Apple Bindings | Update SDKCrypto podspec files 2024-05-22 19:50:37 +02:00
Valere
ee040aba60 split for do in several lines 2024-05-22 09:55:25 +02:00
Valere
f7e06d0c20 Generate ffi files only using aarch64-apple-ios 2024-05-22 09:55:25 +02:00
Valere
d2ecf461d0 fix script 2024-05-22 09:55:25 +02:00
Valere
a1bbe9d810 reduce build time of CI check 2024-05-22 09:55:25 +02:00
Valere
6ad26fff5c remove unneeded \ at end of script 2024-05-22 09:54:43 +02:00
Valere
de989b2c51 fmt 2024-05-22 09:54:43 +02:00
Valere
ea4737269f Fix crypto xcframework apple bindings 2024-05-22 09:54:43 +02:00
Benjamin Bouvier
bac0654a63 sliding sync: don't store the server-computed name in place of the raw name event
If we want to be able to note the absence of a room name, we shouldn't
take the name returned by the server (which may be computed, and thus
always be non-null). This way, we can expose both the name contained in
the m.room.name event as well as the computed name everywhere.

A consequence of this is that the room list service must now ask for the
m.room.name event as part of the required state for every room.
2024-05-17 15:14:47 +02:00
Valere
6111beded7 ffi: Expose ed25519/curve25519 keys in bindings (#3420) 2024-05-17 13:55:18 +02:00
Jorge Martín
3914e31461 ffi: Add the user's display name to RoomMembership timeline content
This is useful to properly format membership state events.
2024-05-17 10:45:48 +02:00
Benjamin Bouvier
7ae0bcecfd room preview: rejigger public API to pass a RoomOrAliasId in place of a RoomId to get_room_preview 2024-05-16 10:58:41 +02:00
Benjamin Bouvier
1fd29f7b6d room preview: allow passing through a list of servers to discover a room with MSC3266
Fixes #3395.`
2024-05-16 10:58:41 +02:00
Benjamin Bouvier
c8f6fe4f6d event cache/timeline: reuse the Paginator when running back-paginations (#3373)
* event cache: reuse the paginator internally

Fixes #3355.

* event cache: move the `pagination_token_notifier` into the `RoomPaginationData` as well

* event cache: introduce a `RoomPagination` API object and move code around

Only code motion. No changes in functionality.

* event cache: remove "paginate" (et al.) in `RoomPagination` method names

No changes in functionality, just renamings.

* event_cache/timeline: have the event cache handle restarting a back-pagination that failed under our feet

When a timeline reset happens while we're back-paginating, the event
cache method to run back pagination would return an success result
indicating that the pagination token disappeared. After thinking about
it, it's not the best API in the world; ideally, the backpagination
mechanism would restart automatically.

Now, this was handled in the timeline before, and the reason it was
handled there was because it was possible to back-paginate and ask for a
certain number of events. I've removed that feature, so that
back-pagination on a live timeline matches the capabilities of a
focused-timeline back-pagination: one can only ask for a given number of
*events*, not timeline items.

As a matter of fact, this simplifies the code a lot by removing many
data structures, that were also exposed (and unused, since recent
changes) in the FFI layer.

* Address review comments
2024-05-16 10:22:05 +02:00
Ivan Enderlin
7ed6db9758 Merge pull request #3406 from zecakeh/edit-without-relation
ui: Make Timeline::edit take a RoomMessageEventContentWithoutRelation
2024-05-15 10:55:21 +02:00
Damir Jelić
6672302684 chore: Make the url crate a workspace dependency 2024-05-14 10:47:22 +02:00
Kévin Commaille
9e4125bb39 ui: Make Timeline::edit take a RoomMessageEventContentWithoutRelation
Like send_reply.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-05-13 20:25:44 +02:00
Ivan Enderlin
964553952d Merge pull request #3399 from matrix-org/stefan/invitesListCleanup
feat(ui): enable `room-list-with-unified-invites` by default, remove …
2024-05-13 11:51:10 +02:00
Ivan Enderlin
5c52014c4b Merge pull request #3386 from matrix-org/stefan/joinedRoomListFilter
feat(ui): add room list filter for excluding non-joined rooms
2024-05-13 11:24:13 +02:00
Stefan Ceriu
85d09c3c56 feat(ui): enable room-list-with-unified-invites by default, remove old invites sliding sync list. 2024-05-13 11:55:38 +03:00
Kévin Commaille
787b2d31cd chore: Fix warnings during compilation
cargo says that default_features will not be supported anymore in 2024 edition

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-05-10 11:32:05 +02:00
Doug
23f17614e5 ffi: Allow joining a room ID with server names. 2024-05-09 19:32:16 +02:00
Doug
eebbb74be7 ffi: Include servers when resolving a room alias.
Rename result.
2024-05-09 19:32:16 +02:00
Stefan Ceriu
1ce27d6eec feat(ui): add room list filter for excluding non-joined rooms 2024-05-08 12:48:14 +03:00
Michael Hollister
74b79d8212 ffi: Added dehydrated flag to Device
Signed-off-by: Michael Hollister <michael@futo.org>
2024-05-07 22:28:18 +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
Ivan Enderlin
8ac51c19f5 Merge pull request #3369 from matrix-org/bnjbvr/get-rid-of-notificationclientbuilder
notification client: get rid of builder
2024-05-02 09:34:32 +02:00
Benjamin Bouvier
a3f6e0fb5a ffi: add back a raw_name() Room method and RoomInfo field for the name defined in the raw state event
And rename "name" to "display_name" everywhere, duh.
2024-05-01 14:32:38 +02:00
Benjamin Bouvier
f997256c73 ffi: revert a few methods back to sync
And sprinkle useful comments here and there.
2024-05-01 14:32:38 +02:00
Benjamin Bouvier
e56d092b4a ffi: simplify RoomInfo::new() by getting the room avatar url internally
Before, it was computed externally and passed as a parameter.
2024-05-01 14:32:38 +02:00
Benjamin Bouvier
dedfc2649a ffi: get rid of name(), and use the computed_display_name() everywhere
This should make it more regular, in all the places, to use the same
string:
- Room
- RoomListItem
- RoomInfo
2024-05-01 14:32:38 +02:00
Benjamin Bouvier
90bed18415 ffi: make the name method sync again
Also:

- rename `display_name` to `computed_display_name` in several places,
and reflect that change into a few callers
- simplify slightly the `computed_display_name()` method
2024-05-01 14:32:38 +02:00
Benjamin Bouvier
a3061eb39a ffi: make RoomListItem::is_direct sync again
And comment why some methods it's calling are async under the hood.
2024-05-01 14:32:38 +02:00
Benjamin Bouvier
0ba4e42161 notification client: get rid of builder
The builder had only one meaningful method, `filter_by_push_rules`,
which was always called by the applications — and in fact should always
be true. It was designed as an extra method because it was experimental
at the time, but it's stabilized sufficiently that we can enable this
behavior by default now, considering that a notification that is not
wanted by the user shouldn't be kept, to respect their intent. (This is
in the UI crate, which is opinionated, so it's fine to assume such
intents by design.)
2024-05-01 13:13:14 +02:00
Benjamin Bouvier
ff40ef0176 ffi: replace some block_on asyncs by async() functions 2024-05-01 11:11:04 +02:00
Benjamin Bouvier
d02125ba21 ffi: simplify notification settings locks
This gets rid of a few calls to `RUNTIME.block_on`.
2024-05-01 11:11:04 +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
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
Doug
4618d7ca7d ffi: Allow creation of a matrix.to link for any room alias. 2024-04-29 12:00:36 +02:00
Ivan Enderlin
25f893b0bb Merge branch 'main' into bnjbvr/permalink-mvp 2024-04-25 16:02:23 +02:00
Andy Balaam
415617080a Merge pull request #3337 from matrix-org/andybalaam/utd-type-info
crypto: UtdCause enum in reporting hooks and encryption event
2024-04-25 08:55:50 +01:00
Andy Balaam
2c7afc201f Merge pull request #3326 from matrix-org/andybalaam/allow-setting-encryption-settings
ffi: Expose encryption settings via FFI
2024-04-25 08:55:43 +01:00
Andy Balaam
89abb75d4d crypto: Include UTD cause in FFI EncryptedMessage 2024-04-24 12:16:17 +01:00
Benjamin Bouvier
397a26e00b ffi: add bindings for the timeline focus mode and associated functions 2024-04-23 19:02:59 +02:00
Andy Balaam
ebcf1c434c ffi: Expose encryption_settings via FFI 2024-04-23 15:45:29 +01:00
Andy Balaam
b5e2eb6831 crypto: Add a UtdCause and code to determine it for membership 2024-04-23 15:44:39 +01:00
Benjamin Bouvier
d9864373f3 timeline: add the ability to set a prefix for internal IDs 2024-04-23 13:19:32 +02:00
Benjamin Bouvier
e4331ac9b8 timeline: use a string instead of a u64 to identify timeline items
This will allow to define a prefix later, to distinguish detached
timelines from live timelines.
2024-04-23 13:19:32 +02:00
Benjamin Bouvier
5916192fb6 ffi: don't abort RoomInfo creation if the room member invite event is missing
`Room::invite_details()` can return an error if the room member event
(the invite) is missing from the store. Usually that would be a sign
that the state is semi-broken, since there should always be such an
event for an invited room. But if it's missing, it shouldn't break the
creation of a `RoomInfo`, and just be missing from the struct.
2024-04-23 11:05:44 +02:00