Commit Graph

13223 Commits

Author SHA1 Message Date
Andy Balaam 22fd44df10 Fix comments from review feedback 2023-06-14 15:31:25 +01:00
Jonas Platte b4cd0c71bf ui: Add loading indicator before waiting for prev_batch token
… in Timeline::paginate_backwards.
2023-06-14 14:00:58 +02:00
Kévin Commaille b4fdfee7f0 base: Use batch methods in Room::get_members
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille 38fc1f7b15 base: Add method to construct RoomMember from parts
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille e32e9b5a22 base: Add state store method to fetch several display_names at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille 7cba6d0849 base: Add state store method to fetch several presence events at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille b8abd1c022 base: Add state store method to fetch several profiles at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille 4103d1b3e3 sdk: Add room method to fetch several state events at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Kévin Commaille f740195eb6 base: Add state store method to fetch several state events at once
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 13:51:52 +02:00
Jonas Platte ae4ead5550 Upgrade typos CI action
… and update the config file to reduce check flakiness.
2023-06-14 12:31:32 +02:00
Jonas Platte 820d3aff65 Rewrap base64 test strings 2023-06-14 12:31:32 +02:00
Jonas Platte b3017a1073 Fix typos 2023-06-14 12:31:32 +02:00
Ivan Enderlin b9c27b5c63 feat(ui): Implement Room::*unread_notifications. 2023-06-14 12:15:16 +02:00
Ivan Enderlin 1bc455f75b feat(ffi): Room:add_timeline_listener returns a …Result.
This patch updates `Room::add_timeline_listener` to return a `RoomTimelineListenerResult`, a new type defined as:

```rust
pub RoomTimelineListenerResult {
    items: Vec<Arc<TimelineItem>>,
    items_stream: TaskHandle,
}
```

It is not possible to cancel the `items_stream` by cancelling the
`TaskHandle`. Without this, dropping `Room` won't drop the `Timeline`,
as a clone is moved inside the spawned task. As a consequence, it will
endlessly call the listener.
2023-06-14 11:56:07 +02:00
Ivan Enderlin 97e4a5cab0 chore(ffi): Remove RoomListItem::timeline.
What the FFI user wants is to subscribe a listener to the
timeline updates. This feature is already supported by
`room_item.full_room().add_timeline_listener()`.  So we can safely
remove `RoomListItem::timeline` as we are sure it's never going to be
used for now.
2023-06-14 11:13:06 +02:00
Ivan Enderlin 192b9ce808 feat(ui+ffi): Implement Room::id as a shortcut.
It's possible to do `room.inner_room().room_id()` but it's just simpler
to call `room.id()`. This patch adds this shortcut.

It's especially useful for FFI users, where creating a “full
room” (`room_item.full_room().room_id()`) may be expensive.
2023-06-14 10:59:03 +02:00
Ivan Enderlin dba397d470 feat(ffi): Add RoomListItem::subscribe and ::unsubscribe. 2023-06-14 10:56:59 +02:00
Ivan Enderlin 712b395310 feat(ui): Add Room::subscribe and ::unsubscribe.
This patch adds the `subscribe` and `unsubscribe` method on `Room`.

To achieve that, `Room` receives an `Arc<SlidingSync>`, as the
subscription methods are on `SlidingSync`. It's just easier to put them
on `Room` for the API consumer. It makes the API also more elegant.

Finally, the patch adds the appropriate test.
2023-06-14 10:51:37 +02:00
Kévin Commaille eb5af4287f sdk: Allow to get rooms filtered by room state
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Kévin Commaille c978fa6d40 base: Deprecate BaseClient::get_stripped_rooms
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Kévin Commaille ac8ea4786c base: Deprecate StateStore::get_stripped_room_infos
It is now unused.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Kévin Commaille 281870b33f base: Remove stripped rooms list from Store
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Kévin Commaille bcd7e92a94 base: Allow to get rooms filtered by state
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Kévin Commaille ea219d836e base: Do not separate stripped room info
Since stripped and non-stripped room infos use the same types,
the separation is not necessary anymore.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-06-14 10:45:37 +02:00
Damir Jelić f67c592259 Properly support the hkdf-hmac-sha256.v2 MAC method for the SAS verification (#2064) 2023-06-14 10:17:22 +02:00
Ivan Enderlin 0db5a6a25d Merge branch 'main' into pr/2058 2023-06-14 09:55:31 +02:00
Ivan Enderlin 2c871807a3 feat(ui+ffi): Add various features to RoomList
feat(ui+ffi): Add various features to `RoomList`
2023-06-14 09:22:24 +02:00
Ivan Enderlin f55c1021c4 Merge pull request #2065 from matrix-org/rav/fix-docs
crypto-js: improvements to the documentation
2023-06-14 08:35:59 +02:00
Richard van der Hoff f78a2951e4 more doc fixes 2023-06-13 22:10:48 +01:00
Richard van der Hoff a8468cba59 crypto-js: improvements to the documentation
... mostly, writing down what things actually return.
2023-06-13 21:54:19 +01:00
Damir Jelić 48a24a6aed Use the short auth strings from the start content when accepting a verification (#2061)
Co-authored-by: Benjamin Bouvier <public@benj.me>
2023-06-13 17:33:57 +00:00
Benjamin Bouvier a79d519ff9 sliding sync: always fall back to the auto-discovered proxy URL, if any
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-06-13 19:33:30 +02:00
Jonas Platte 47a67d1d67 Upgrade Ruma 2023-06-13 18:33:28 +02:00
Jonas Platte adb9e60fbe common: Add executor::JoinHandle
… and simplify wasm spawn implementation.

This reduces the differences on wasm vs. non-wasm. Of course it's still
possible to rely on details of the different error types, but at least
both implement a few common traits:
`Debug`, `Display`, `Error`.
2023-06-13 16:50:33 +02:00
Andy Balaam 240a7f7aae Make set_state public to avoid unused warning 2023-06-13 13:43:46 +01:00
Andy Balaam f36a5b8cd7 Deserialise events early so we don't have to do it multiple times
We pass the already-deserialised event in to handle_state and
process_sliding_sync_room_membership, to avoid deserialising inside both
of them.
2023-06-13 13:05:14 +01:00
Andy Balaam 451398612a In Sliding Sync, find out which rooms we have left from state events
Look through m.room.member events when processing Sliding Sync
responses, finding those that refer to our user's membership, so that we
can recognise which rooms we have left.
2023-06-13 13:05:14 +01:00
Benjamin Bouvier 8aa12c929a chore: group GossipMachine fields inside an Arc-struct
Signed-off-by: Benjamin Bouvier <public@benj.me>
2023-06-13 12:28:37 +02:00
Andy Balaam 5c8a5466cf Use async_test to mark sliding sync tests 2023-06-13 12:15:49 +02:00
Andy Balaam 9a3060793c Extract a function for processing misc properties of a room in sliding sync 2023-06-13 12:15:49 +02:00
Andy Balaam 085c9767f0 Extract a function for processing membership of a room in sliding sync 2023-06-13 12:15:49 +02:00
Jonas Platte 2c71556ef2 Upgrade opentelemetry dependencies 2023-06-13 11:08:45 +02:00
Jonas Platte e78dbaf7c6 ffi: Don't require native-tls 2023-06-13 10:33:52 +02:00
Ivan Enderlin 15199316d3 doc(ui): Fix an intra-link. 2023-06-13 01:30:49 +02:00
Ivan Enderlin 1c8772848a feat(ui): Add the required state m.room.power_levels for all_rooms in RoomList. 2023-06-13 01:24:43 +02:00
Ivan Enderlin 9f6bc7d35f feat(ui): Configure filters for RoomList lists. 2023-06-13 01:24:43 +02:00
Ivan Enderlin 65959b07a4 feat(ui): Configure required_state for all_rooms in RoomList. 2023-06-13 01:24:43 +02:00
Ivan Enderlin 901deaf8e0 feat(ui): Enable common extensions on RoomList. 2023-06-13 01:24:43 +02:00
Ivan Enderlin 370083ee03 feat(ui,ffi): Add getter for matrix_sdk(_ffi)::Room. 2023-06-13 01:24:43 +02:00
Ivan Enderlin 5c01917f42 chore(ui): Split matrix_sdk_ui::room_list::mod.rs into smaller modules.
No code changes. This patch is just moving things around.
2023-06-13 01:24:43 +02:00