Commit Graph

8148 Commits

Author SHA1 Message Date
Ivan Enderlin
344a96a80f feat: Introduce the Filter trait alias.
This patch introduces the
`matrix_sdk_ui::room_list_service::filters::Filter` trait alias.

This patch also cleans up a little bit the filters by renaming some
methods for the sake of consistency across all the existing filters.
2024-02-07 10:23:22 +01:00
Ivan Enderlin
4e8c63e4e0 Merge pull request #3059 from matrix-org/fga/room_typing_notifications
Room typing notifications
2024-02-07 09:52:22 +01:00
Damir Jelić
452cf0f269 Add a missing changelog entry for the Client::sync_token() method 2024-02-07 08:23:13 +01:00
ganfra
e78c4b89b4 Merge branch 'main' into fga/room_typing_notifications 2024-02-06 16:54:54 +01:00
Damir Jelić
bcf8cc1c57 Fix a clippy warning about a large error variant 2024-02-06 16:17:05 +01:00
Damir Jelić
f47e7b3427 Ensure the Olm session state is recorded in both decryption paths 2024-02-06 16:17:05 +01:00
Damir Jelić
8252379f76 Record the Olm session before we try to decrypt
A decryption failure would have prevented the recording of the session
otherwise. We are mostly interested in the state of the session if a
decryption failure happens.
2024-02-06 16:17:05 +01:00
Damir Jelić
2ef1e32f9a Add the message to log lines when we decrypt a Olm message 2024-02-06 16:17:05 +01:00
Damir Jelić
47a4f473a6 Bump vodozemac
This adds more detailed logging for Olm messages
2024-02-06 16:17:05 +01:00
Andy Balaam
9d6d2c3b3c Merge pull request #3097 from matrix-org/doug/swift-task
Improve the handling of targets in the Swift xtask.
2024-02-06 09:22:12 +00:00
Doug
bd38dc971b xtask: Tidy-up the swift task. 2024-02-05 16:27:02 +00:00
Doug
2f6d0450a7 xtask: Simplify the code used to build targets for Swift. 2024-02-05 15:50:46 +00:00
Doug
e07ed14d20 xtask: Add supported swift targets and iterate through them when building. 2024-02-05 15:30:35 +00:00
Ivan Enderlin
ae97772909 feat(sdk,ui): Remove SlidingSyncRoom::latest_event
feat(sdk,ui): Remove `SlidingSyncRoom::latest_event`
2024-02-05 12:57:07 +01:00
Ivan Enderlin
8975e6ab5d Merge pull request #3076 from matrix-org/stefan/mark_unread
Add support for MSC2867 - Manually marking rooms as unread
2024-02-05 12:40:52 +01:00
Andy Balaam
32aa784c5f Merge pull request #3094 from matrix-org/andybalaam/fix-incorrect-url
doc: Fix an incorrect URL about Indexed DB
2024-02-05 11:30:51 +00:00
Andy Balaam
56e155300c doc: Fix an incorrect URL about Indexed DB
Signed-off-by: Andy Balaam <andy.balaam@matrix.org>
2024-02-05 11:07:08 +00:00
Ivan Enderlin
df61037ac5 fix(base,sdk): Fix imports. 2024-02-05 11:59:31 +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
Ivan Enderlin
6e685e2e09 Merge pull request #3062 from zecakeh/ambiguity-changes
sdk: Allow to track ambiguity changes per-room
2024-02-05 11:53:10 +01:00
Ivan Enderlin
ad5c1202b5 feat(sdk,ui): Remove SlidingSyncRoom::latest_event.
This patch inlines `SlidingSyncRoom::latest_event` into its unique call
site: `SlidingSyncRoomExt::latest_timeline_item`.

`SlidingSyncRoom::latest_event` is not using any data from
`SlidingSyncRoom`, except the `Client`. So it can easily live somewhere
else. Our goal is to clean up `SlidingSyncRoom` as much as possible, and
to remove any kind of logic from it.
2024-02-05 11:09:14 +01:00
Ivan Enderlin
87a07d9ee3 feat(sdk): Remove SlidingSyncRoomInner::inner
feat(sdk): Remove `SlidingSyncRoomInner::inner`
2024-02-05 09:27:44 +01:00
Kévin Commaille
e0bda80e7b Merge branch 'main' into ambiguity-changes
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2024-02-04 11:55:41 +01:00
Andy Balaam
b9ef5d6270 Merge pull request #3090 from matrix-org/andybalaam/indexeddb-clear-store-before-delete
indexeddb: Clear the object store before deleting it
2024-02-02 14:50:01 +00:00
Damir Jelić
fa26499a39 Showcase how to use an event handler context in the custom events example 2024-02-02 15:30:26 +01:00
Andy Balaam
916e85f79e indexeddb: Clear the object store before deleting it
Since my investigation found that it significantly speeds up deletion of
a store on both Firefox and Chromium if you clear() it first, do that in
our migration code.
2024-02-02 14:06:07 +00:00
Ivan Enderlin
f2b61eb5e2 chore: Remove ununsed imports. 2024-02-02 08:42:06 +01:00
Benjamin Bouvier
40e006658c ffi: add missing variants to ffi::event::MessageLikeEventType and use it in the timeline filter types 2024-02-01 19:02:12 +01:00
Benjamin Bouvier
ac2fce8220 ffi: move two event type enums over to matrix-sdk-ffi/event.rs 2024-02-01 19:02:12 +01:00
Benjamin Bouvier
296d613138 ffi: sort event type enums in alphabetical order 2024-02-01 19:02:12 +01:00
Ivan Enderlin
43bed281b1 feat: Replace SlidingSyncRoom::inner by SlidingSyncRoom::prev_batch.
This patch removes the need to store and to update the
`SlidingSyncRoom::inner` field (of type `v4::SlidingSyncRoom`). Now,
we just need to handle the `prev_batch`, which is the only data we care
about.

Bonus: it reduces the size of the frozen sliding sync room quite much.
2024-02-01 17:45:30 +01:00
Ivan Enderlin
b951d0d785 feat(sdk,base,ui,ffi): Continue to remove dead code in SlidingSyncRoom
feat(sdk,base,ui,ffi): Continue to remove dead code in `SlidingSyncRoom`
2024-02-01 17:20:36 +01:00
Ivan Enderlin
a802b733f8 feat(sdk): Remove the SlidingSyncRoom::name method.
This patch removes the `SlidingSyncRoom::name` method. The name is
already synchronized with the `matrix_sdk_base::Room`. This code is
then useless.
2024-02-01 15:26:25 +01:00
Ivan Enderlin
6acd68cf00 feat(sdk): Remove the SlidingSyncRoom::is_dm method.
This patch removes the `SlidingSyncRoom::is_dm` method. It's not used
anywhere in the SDK, neither by the FFI bindings. Since this code is
still experimental, it's fine to remove public API.
2024-02-01 15:20:56 +01:00
Ivan Enderlin
75365a7774 feat(sdk): Remove the SlidingSyncRoom::is_initial_response method.
This patch removes the `SlidingSyncRoom::is_initial_response` method.
It's not used anywhere in the SDK, neither by the FFI bindings. Since
this code is still experimental, it's fine to remove public API.
2024-02-01 15:13:03 +01:00
Ivan Enderlin
61a5f1b3cf feat(sdk): Remove the SlidingSyncRoom::required_state method
feat(sdk): Remove the `SlidingSyncRoom::required_state` method
2024-02-01 14:47:48 +01:00
Ivan Enderlin
44e438b21b feat(sdk): Remove the SlidingSyncRoom::required_state method.
This patch removes a useless and not used (in the Matrix Rust SDK, along with the FFI bindings) method: `SlidingSyncRoom::required_state`.
2024-02-01 14:35:42 +01:00
Ivan Enderlin
7b49283394 feat(sdk,ui,ffi): Remove SlidingSyncRoom::has_unread_notifications and ::unread_notifications
feat(sdk,ui,ffi): Remove `SlidingSyncRoom::has_unread_notifications` and `::unread_notifications`
2024-02-01 14:07:22 +01:00
Benjamin Bouvier
e0384494b6 sdk: use a Mutex instead of a RwLock for the sync lock
I think the reasoning behind using a RwLock for sync, and notably allowing multiple concurrent `.read()` lock taking was flawed: since there's no way
to identify which subpiece of the store we're reading and writing, there could be two concurrent requests to the write to the same thing at the same
time. To get rid of this possibility, this commit changes the lock to a single access only Mutex lock.
2024-02-01 14:07:04 +01:00
ganfra
cc236e39d5 typing : filter the current user id 2024-02-01 12:54:10 +01:00
Ivan Enderlin
c4d5657162 chore: Remove unused imports. 2024-02-01 12:26:44 +01:00
ganfra
59f9f43f15 Merge branch 'main' into fga/room_typing_notifications 2024-02-01 12:18:26 +01:00
Ivan Enderlin
261eb99614 feat(ffi): Remove room_list::Room::has_unread_notifications and ::unread_notifications.
In the previous commit, these methods have been removed from `matrix_sdk_ui`.
2024-02-01 11:57:11 +01:00
Ivan Enderlin
5ae638047e feat(ui): Remove room_list::Room::has_unread_notifications and ::unread_notifications.
This patch removes the `room_list::Room::has_unread_notifications` and
the `::unread_notifications` methods. Since the previous commits,
the respective `SlidingSyncRoom` methods have been removed too. It's
better to use the `Deref` implementation of `room_list::Room` to
`matrix_sdk::Room` to use the correct methods.
2024-02-01 11:54:48 +01:00
Ivan Enderlin
8ee0021641 feat(sdk): Remove SlidingSyncRoom::has_unread_notifications and ::unread_notifications.
This patch removes the `SlidingSyncRoom::has_unread_notifications`
and the `::unread_notifications` methods. It doesn't hold any relevant
information that `matrix_sdk::Room` can provide.
2024-02-01 11:53:26 +01:00
Ivan Enderlin
39241c5e18 fix(base,sdk,ui): Synchronize sliding sync room's avatar with regular Room
fix(base,sdk,ui): Synchronize sliding sync room's avatar with regular `Room`
2024-02-01 11:17:45 +01:00
Ivan Enderlin
9ef9251936 feat(ui): Remove the fallback mechanism for avatar in room_list_service::Room.
`SlidingSyncRoom` no longer has an `avatar_url` method.
`room_list::Room` no longer needs to check first in sliding sync then in
`Room` as a fallback.

This patch removes the `room_list::Room::avatar_url` method.

This patch also implements `Deref` for `room_list::Room` to
`matrix_sdk::Room`, to make our lifes easier.
2024-02-01 10:58:05 +01:00
Ivan Enderlin
90f1a34855 feat(sdk): Remove the avatar_url logic in SlidingSyncRoom.
With the previous commit, the avatar is properly synchronized with the
`Room`. The result is that `SlidingSyncRoom` no longer needs to hold
the `avatar_url`.
2024-02-01 10:58:05 +01:00
Ivan Enderlin
e00532f5d2 feat(base): Update room's avatar from SlidingSyncRoom::avatar.
To update the avatar of a room, one has to look up in the state event.
That's the canonical way to do. For Sliding Sync, it means looking
inside the `required_state` field of the `v4::SlidingSyncRoom`. This
case already works and was tested.

However, a `v4::SlidingSyncRoom` comes with a direct `avatar` field.
It's another way to know the avatar URL of the room. This case was
handled and tested in `matrix_sdk::sliding_sync::SlidingSyncRoom`, but
it was never propagated into the proper sync mechanism. So when the
`avatar` field was set up, `matrix_sdk::sliding_sync::SlidingSyncRoom`
was holding this information, and the `avatar` wasn't defined in the
proper `Room`: `SlidingSyncRoom` has to look up inside the `Room` as
a fallback.

This patch is the first one to fix this “fallback” mechanism.

The `avatar` field of a `v4::SlidingSyncRoom` now triggers an update to
the new `RoomInfo::update_avatar` method (à la `update_name`), via
`process_room_properties`.
2024-02-01 10:58:05 +01:00