Commit Graph

13223 Commits

Author SHA1 Message Date
Daniel Salinas
07656c2e26 Correct use to propagate error with additional text 2025-06-19 09:42:43 +02:00
Daniel Salinas
940325574b Address use of errors and panic::resume_unwind for wasm targets 2025-06-19 09:42:43 +02:00
Damir Jelić
9f8824b9a5 ci: Use a tag for the changed-files github action 2025-06-17 16:13:39 +02:00
Valere Fedronic
cd141c5b84 feat(widget): Receive custom to-device messages in widgets in e2ee rooms
Proper support for receiving to-device messages for widgets.

If the widget is in an e2ee room, clear to-device traffic will be excluded. Also filter out internal to-device messages that widgets should not be aware off.
2025-06-17 16:00:44 +02:00
dependabot[bot]
9596aa0830 chore(deps): bump qmaru/wasm-pack-action from 0.5.0 to 0.5.1
Bumps [qmaru/wasm-pack-action](https://github.com/qmaru/wasm-pack-action) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/qmaru/wasm-pack-action/releases)
- [Commits](https://github.com/qmaru/wasm-pack-action/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: qmaru/wasm-pack-action
  dependency-version: 0.5.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-17 13:56:43 +02:00
Benjamin Bouvier
11424ce443 chore(ffi): add the SDK commit hash to sentry as the release version 2025-06-16 16:44:48 +02:00
Benjamin Bouvier
cd4ec90b38 chore(timeline): report day divider invariant violations to sentry
On this date (heh), the date divider reports include the following
information:

- initial timeline items in a shortened format,
- operations to apply,
- final timeline items in the same shortened format,
- errors

The shortened format includes:

- either, for events: "[event id]: server timestamp"
- or for date divider: "--- date divider timestamp"

As such, they don't include any personal information.

The initial timeline items state and set of operations to apply
constitutes a fully enclosed test case, so it's nice to report it to
Sentry, so we can reuse it almost as is (we'd only need to randomize the
event IDs) and fix it in a subsequent commit.
2025-06-16 16:44:48 +02:00
Benjamin Bouvier
4680354abd fix(timeline): remove development tracing log in the pinned events loader 2025-06-16 14:25:30 +02:00
Damir Jelić
145d6c5782 refactor(multiverse): Use a paragraph to render an individual read receipt 2025-06-16 12:54:40 +02:00
Damir Jelić
a955af61e1 refactor(multiverse): Simplify the selected read receipt rendering
This patch simplifies the selected read receipt rendering by the fact
that we can simply fetch the selected timeline item instead of the event
ID and then do a search for the selected item.

Co-authored-by: Benjamin Bouvier <benjamin@bouvier.cc>
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2025-06-16 12:54:40 +02:00
Damir Jelić
2a78b5b67a chore: Fix a clippy lint 2025-06-16 12:54:40 +02:00
Damir Jelić
9d29c36531 feat(multiverse): Only render read receipts for a single event if one is selected 2025-06-16 12:54:40 +02:00
Damir Jelić
ed9c7d90b4 feat(multiverse): Allow event selection even if the details view is open 2025-06-16 12:54:40 +02:00
Damir Jelić
2af23d052c feat(multiverse): Show the selected event in the read receipts view 2025-06-16 12:54:40 +02:00
Damir Jelić
fb80e06839 feat(multiverse): Show read receipts for individual messages 2025-06-16 12:54:40 +02:00
Daniel Salinas
b8f9cba5e7 Wasm corrections for ffi's error file
Add a From to handle RequestVerificationError to avoid anyhow
Stop using SystemTime directly
2025-06-16 09:14:54 +02:00
Daniel Salinas
d119b01322 Add AbortHandle as well 2025-06-16 09:09:28 +02:00
Daniel Salinas
85833c74ba Update JoinHandle as well 2025-06-16 09:09:28 +02:00
Daniel Salinas
5b20136a50 Stop using tokio::runtime::Handle directly
Use our platform aware export from matrix-sdk-common instead
2025-06-16 09:09:28 +02:00
Ivan Enderlin
362ca2bd59 doc(base): Remove ambiguities around inline comments. 2025-06-13 14:52:15 +02:00
Ivan Enderlin
0a9a849826 fix(base): Ignore invalid state events instead of throwing an error.
This patch changes the strategy of `check_room_upgrades`.
Instead of checking all state events in `StateChanges` and
throwing an error in case of an invalid state, this patch updates
`state_events::sync::dispatch` to filter out invalid state events
(specifically `m.room.create` and `m.room.tombstone`), and log the
error. That way, the sync doesn't stop and the app can continue working
smoothly.

So `check_room_upgrades` is splited into two functions:
`is_create_event_valid` and `is_tombstone_event_valid`. It's no longer
necessary to detect mergers or splitters because those are _soft
errors_, however loops are still critical errors (hence the fact
the state events aren't stored nor saved nor applied, and that a log
is emitted).

Note: `check_room_upgrades` has been reverted in a previous commit,
that's why it doesn't appear in this diff.
2025-06-13 14:52:15 +02:00
Valere Fedronic
7126fc8a29 feat(crypto): Emmit EncryptionInfo with event handlers for to-device messages as well 2025-06-13 14:31:22 +02:00
Stefan Ceriu
f4e612ca9e feat: add thread support to the room message draft facilities
This patch adds optional thread root event id parameters to the drafting functions exposed on the room level
allowing unfinished messages to be managed for the main room as well as any inner thread.

Internally it uses the room id or a tuple of the room id and the thread as keys for the various backing stores.
matrix-sdk-ffi/20250618
2025-06-13 14:41:10 +03:00
Richard van der Hoff
6ab11a0323 Merge pull request #5219 from matrix-org/rav/megolm_sender_verification_main
crypto: new `VerificationLevel::MismatchedSender`
2025-06-12 12:44:47 +01:00
Stefan Ceriu
76626db613 chore(ffi): expose ThreadSummary num_replies on the ffi layer. 2025-06-12 14:26:40 +03:00
Benjamin Bouvier
bcea1d32e6 refactor(multiverse): use a log line instead of a status message for showing intent to open a thread view 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
346f11319c refactor(multiverse): move the opening of a threaded timeline to its own function 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
937b223627 chore(multiverse): add missing help lines for the new functionalities 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
000d8514f6 refactor(multiverse): store the selected room in the TimelineKind::Room field 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
72692b7b33 feat(multiverse): add basic support for threads 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
0f84d482b9 refactor(multiverse): inline send_message_impl into its own caller
Also don't clear the input if the timeline wasn't found yet.
2025-06-12 13:25:08 +02:00
Benjamin Bouvier
c609150a3e refactor(multiverse): introduce RoomView::get_selected_timeline() 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
2f46a6c8a0 refactor(multiverse): use Client to get a Room object by room id 2025-06-12 13:25:08 +02:00
Benjamin Bouvier
7bdddc9d35 refactor(multiverse): misc tiny changes
Notably, avoid holding a lock if it's not going to be used later.
2025-06-12 13:25:08 +02:00
Stefan Ceriu
5113f114a7 fix(ui): forward live events to threaded timelines, the same as live ones
- drop `is_live` and `is_pinned_events` and use the timeline focus directly at the decision point.
2025-06-12 12:57:10 +03:00
Stefan Ceriu
9d96d6ead2 feat(ffi): add support for sending locations as replies or within threads 2025-06-12 12:57:10 +03:00
Daniel Salinas
c340a7187a feat(wasm): Fix cargo runtime on Wasm platforms (#5220)
When file was
[moved](2a140770a0)
it looks like an update was missed, since wasm is not in the CI yet.

Signed-off-by: Daniel Salinas
2025-06-11 22:07:54 +02:00
Richard van der Hoff
0aece695dc crypto: update changelog 2025-06-11 17:15:44 +01:00
Richard van der Hoff
b2210292bf crypto: Add a test for spoofed sender, with TrustRequirement::CrossSigned 2025-06-11 17:06:44 +01:00
Richard van der Hoff
f0ab6cb1a4 crypto: use a dedicated VerificationLevel if we know the sender of an event is spoofed 2025-06-11 17:06:44 +01:00
Richard van der Hoff
c2eeca3f33 crypto: add some instrumentation to get_room_event_encryption_info
It helps to know which event we're getting the encryption info for.
2025-06-11 16:51:51 +01:00
Benjamin Bouvier
cc974dd3c9 refactor(event cache): use Event instead of TimelineEvent more evenly 2025-06-11 17:04:15 +02:00
Benjamin Bouvier
8b2a8e7265 refactor(event cache): move the timeline-event-diffs sending back into the callers 2025-06-11 17:04:15 +02:00
Benjamin Bouvier
7cad237dc6 refactor(event cache): reduce indent in maybe_apply_new_redaction 2025-06-11 17:04:15 +02:00
Benjamin Bouvier
72a3972303 refactor(event cache): simplify mutating the RoomEvents in RoomEventCacheStore
No more generic function parameter! Having a separate function for
post-processing is simple enough.
2025-06-11 17:04:15 +02:00
Benjamin Bouvier
2e590e2f67 refactor(event cache): only mark that we've waited for an initial previous-batch token after a sync
It doesn't make sense to do it after a back-pagination, since a
back-pagination does require a previous-batch token in the first place,
meaning that if we did paginate, then we did wait for a previous-batch
token beforehand.
2025-06-11 17:04:15 +02:00
Benjamin Bouvier
224e437a78 refactor(event cache): simplify handling of previous-batch token in handle_backpagination too 2025-06-11 17:04:15 +02:00
Benjamin Bouvier
8a9cae4af3 refactor(event cache): have even fewer methods return timelinediff updates 2025-06-11 17:04:15 +02:00
Benjamin Bouvier
22a15f1342 refactor(event cache): remove code comment that doesn't make sense anymore 2025-06-11 17:04:15 +02:00
Benjamin Bouvier
3ab4584dfe refactor(event cache): have fewer methods return timelinediff updates 2025-06-11 17:04:15 +02:00