Stefan Ceriu
da2dda0e45
fix(ui): populate the thread_root and in_reply_to fields for stickers and polls
...
They have never been set and there was no way of telling if stickers and polls belong on a thread or come in reply of any other message.
This patch also exposes methods for setting these relations on the event factory level.
2025-05-15 16:45:34 +03:00
Benjamin Bouvier
69b8878890
fix(sdk): mark rooms joined with join_room_by_id or join_room_by_id_or_alias as DMs if needs be
...
This moves the logic from `Room::join()` to these two methods. This is
isofunctional, because `Room::join()` does call into
`Client::join_room_by_id()` internally.
2025-05-15 14:19:31 +02:00
Damir Jelić
7893e55a8d
refactor(crypto): Make the room key importing logic more generic
2025-05-15 12:23:23 +02:00
Damir Jelić
c0e45a2e0f
refactor(widgets): Rename the then() function into add_response_handler() ( #5037 )
...
The then() function can be used with booleans and futures to execute a
piece of code if the boolean is true or once the future is completed.
In contrast, the then() function in the widget driver is not executed
immediately. Instead it only adds a callback that is later on executed
by the widget driver.
2025-05-14 16:16:04 +02:00
Stefan Ceriu
13a65c8dfe
feat(ui): add new Thread timeline focus mode and associated events loader ( #5032 )
...
… that allows building a timeline instance specific to a particular
thread root.
Creating a timeline in this mode will start by backpaginating root event
relations with `num_events` and automatically insert the thread root
event when reaching the end. It will include
`RelationsOfType(RelationType::Thread)` but also recurse over the
retrieved events to fetch reactions.
It will not however react to new events received over sync or that the
user sends (for now).
This patch will also help incrementally deliver the upstream client
support for creating such a timeline.
Part of #4833 (meta #4869 ).
2025-05-14 14:14:29 +00:00
Kévin Commaille
36667c1298
chore: Get rid of cargo-deny errors due to new advisories
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-05-14 15:42:46 +02:00
Benjamin Bouvier
e4f2299785
refactor(timeline): get rid of FullEventMeta and replace it with EventMeta + function parameters
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
81a2679bb8
refactor(timeline): only compute the TimelineEventContext when it's needed
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
9087263da4
refactor(timeline): rewrite how failed-to-parse items are added
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
d58111fa04
refactor(timeline): isolate computation of should_add in its own function
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
ab87ea5770
refactor(timeline): simplify computation of should_add a bit
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
6b62b41a60
refactor(timeline): get rid of the return value of find_item_and_apply_aggregation
...
As it's now unused.
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
b1f088277d
refactor(timeline): get rid of HandleEventResult
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
277eae75d9
refactor(timeline): make item_added a local variable instead of deeply-stored context
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
20559e3f2c
refactor(timeline): get rid of unused HandleEventResult::items_updated
2025-05-14 13:30:24 +02:00
Benjamin Bouvier
341f9c267d
feat(state store): enable the busy timeout to automatically retry operations on busy dbs
...
Under some very particular circumstances, the "database is locked" error
can still happen, even in WAL mode, even if the database connection is
not being upgraded from a read transaction to a write transaction.
We *think* this might be the reason behind errors like
github.com/element-hq/element-x-ios/issues/3582, so we're enabling the
sqlite busy_timeout, which will retry the operation after a short sleep,
until the busy timeout is being hit.
2025-05-14 13:27:54 +02:00
Timo
af3039abde
docs(WidgetDriver): Add module documentation
...
Co-authored-by: Robin <robin@robin.town >
Signed-off-by: Damir Jelić <poljar@termina.org.uk >
2025-05-14 11:42:55 +02:00
Benjamin Bouvier
4d027ec405
doc: add a changelog entry for the persistent storage of the event cache
2025-05-13 15:50:21 +02:00
dependabot[bot]
3cd64ac03b
chore(deps): Bump tokio from 1.43.0 to 1.43.1
...
Bumps [tokio](https://github.com/tokio-rs/tokio ) from 1.43.0 to 1.43.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases )
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.43.0...tokio-1.43.1 )
---
updated-dependencies:
- dependency-name: tokio
dependency-version: 1.43.1
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-05-13 14:58:30 +02:00
Jorge Martín
44e103c0e3
feat(ffi): expose ffi::RoomInfo::tombstone
...
This replaces `ffi::RoomInfo::is_tombstoned`, including the needed extra info for the migration UI.
2025-05-13 14:41:41 +02:00
dependabot[bot]
7d992d1af8
chore(deps): Bump ring from 0.17.8 to 0.17.14
...
Bumps [ring](https://github.com/briansmith/ring ) from 0.17.8 to 0.17.14.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md )
- [Commits](https://github.com/briansmith/ring/commits )
---
updated-dependencies:
- dependency-name: ring
dependency-version: 0.17.14
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-05-13 14:37:12 +02:00
Benjamin Bouvier
ac42953524
doc(timeline): add extra documentation for HandleAggregationKind
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
06759359af
refactor(timeline): simplify lightly computation of should_add_new_items for local events
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
a3a30885c0
refactor(timeline): rename TimelineEventKind into TimelineAction and add comments
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
b448c4ac39
refactor(timeline): get rid of TimelineEventKind::Message
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
6a874fec2d
refactor(timeline): use TimelineEventKind::AddItem for most room messages
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
998019b8b8
refactor(timeline): use TimelineEventKind::AddItem for poll starts
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
5a0b33fcd1
refactor(timeline): use TimelineEventKind::AddItem for call invite/notify/sticker
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
ec55d7cb58
refactor(timeline): use TimelineEventKind::HandleAggregation for poll edits/responses/ends
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
706f78d5b3
refactor(timeline): use TimelineEventKind::HandleAggregation for edits
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
1218cb4c28
refactor(timeline): use TimelineEventKind::HandleAggregation for redactions
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
31bd8a3587
refactor(timeline): introduce TimelineEventKind::HandleAggregation for non-items
...
This variant will be used to cause side-effects to existing timeline
items, because the event they relate to is for an aggregation
(edit/reaction/etc.).
This is used here for reactions.
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
9e70cc5dde
refactor(timeline): add a small helper function to create TimelineEventKind::AddItem items
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
d78a4927fd
refactor(timeline): use TimelineEventKind::AddItem for room member and state events
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
bf246b6c09
refactor(timeline): use TimelineEventKind::AddItem for redacted messages
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
5da2235973
refactor(timeline): use TimelineEventKind::AddItem for UTDs
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
a9de4709f9
refactor(timeline): use TimelineEventKind::AddItem to insert failed-to-parse items
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
3b8d7ffacd
refactor(timeline): introduce a new TimelineEventKind::AddItem variant
...
The intent is that the `TimelineItemContent` can be constructed in a
single place, avoiding the need to create it in multiple places.
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
3eee5a4a92
refactor(timeline): bury one use of TimelineEventKind
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
6fed5747bb
refactor(timeline): remove another spurious is_own_event
...
Once again, this information is available in the `TimelineMetadata`.
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
442094a725
refactor(timeline): remove spurious FullEventMeta::is_own_event
...
This information can be accessed via the `TimelineMetadata::own_user_id`
field, which is instantiated only once.
2025-05-13 14:15:00 +02:00
Benjamin Bouvier
de66047eee
refactor(event cache): simplify Deduplicator so it only operates with the store impl
2025-05-13 10:17:21 +02:00
Benjamin Bouvier
48da03a148
refactor(event cache): don't make the store optional in the event cache
2025-05-13 10:17:21 +02:00
Benjamin Bouvier
13a2a8757e
feat(event cache): enable storage by default \o/
2025-05-13 10:17:21 +02:00
Benjamin Bouvier
1d901ec12a
refactor(room list): get rid of the sliding sync in room_list_service::Room
...
This was only used to retrieve events cached in the timeline_queue().
2025-05-13 10:17:21 +02:00
Benjamin Bouvier
7115203a90
feat(event cache): get rid of add_initial_events() entirely
2025-05-13 10:17:21 +02:00
Jorge Martín
68fb60f223
test(ui): add more tests for fetching invite notifications in sliding sync
2025-05-13 09:10:44 +02:00
Jorge Martín
1f064fe474
test(ui): migrate notification fetching tests to use the batched methods
...
Also add one for the sliding sync + /context case
2025-05-13 09:10:44 +02:00
Jorge Martín
008c6f6d6c
feat(ui): allow retrieving push notification events in batches
2025-05-13 09:10:44 +02:00
Yousef Moazzam
1afad3ab78
test: remove import of unused sync_timeline_event! macro
2025-05-13 09:04:55 +02:00