Commit Graph

11651 Commits

Author SHA1 Message Date
Jorge Martín
69ab855efa refactor(room): add RoomMemberWithSenderInfo struct.
This will hold the info for both the room member whose sender id was provided and the sender of the `m.room.member` event from which the `RoomMember` is built.
2025-04-10 09:48:15 +02:00
Damir Jelić
68e3cdebdd chore: Bump the blake3 version 2025-04-09 16:37:40 +02:00
Damir Jelić
511cf78d51 chore: Bump the rusqlite version 2025-04-09 16:37:40 +02:00
Damir Jelić
f4eea708fa chore: Update the ByteSize crate version we're using 2025-04-09 16:37:40 +02:00
Richard van der Hoff
1d3107ebcb multiverse: reduce redraw rate
This reduces the framerate from ~62fps to 10fps.

This is a workaround for a problem in my terminal, so apologies for inflicting
it on everyone else, but here we are, and 10fps seems like it should be enough
for anyone.

The problem in question is specifically when I try to select some text by
dragging the mouse (eg, to copy a generated recovery key). If I start a drag,
but a redraw happens before the mouse has moved [a certain distance?], then the
drag doesn't work, and nothing gets selected. By reducing the framerate, I have
a much better chance of successfully starting a drag.
2025-04-09 16:10:31 +02:00
Richard van der Hoff
073b4bae03 multiverse: allow recovery keys with h or l in them
Currently, `h` and `l` are intercepted by the parent view to change tab,
meaning it's impossible to enter a recovery key which contains those
characters.

The fix here is very blunt: it just disables `h` and `l` for tab-changing. I
considered making it dependent on which tab is open, or what's going on in the
'Encryption' tab, but given you need to know about the alternatives (tab/cursor
keys) to switch away from the Encryption tab, I don't think that makes sense.
2025-04-09 14:53:36 +02:00
Richard van der Hoff
35e13b8730 Merge pull request #4903 from matrix-org/rav/history_sharing/upload_bundle_prep
crypto: prep work for sharing room key history bundles
2025-04-09 10:40:42 +01:00
Damir Jelić
f266fb9c38 chore(ffi): Update the changelog so it conforms to our cargo-release setup 2025-04-09 11:26:59 +02:00
Damir Jelić
2dfd334ade chore: Include the matrix-sdk-ffi crate in the release process 2025-04-09 11:26:59 +02:00
Damir Jelić
89d0cc5a76 chore: Add a missing PR link in one of the changelogs 2025-04-09 09:16:53 +02:00
Stefan Ceriu
628440632d chore(ffi): move reactions from EventTimelineItem to MsgLikeContent to keep in line with the UI crate types 2025-04-08 17:47:17 +03:00
Stefan Ceriu
16a3d9d78b chore(ffi): introduce MsgLike Content and Kind and move mappings 2025-04-08 17:47:17 +03:00
Stefan Ceriu
d89a7d6c18 chore(ffi): move MsgLike related types to their own file 2025-04-08 17:47:17 +03:00
Stefan Ceriu
87c70789fe chore(ffi): move replies to their own file 2025-04-08 17:47:17 +03:00
Damir Jelić
9cde7f46bc docs: Use the github background color for the logo on dark themes 2025-04-08 16:13:59 +02:00
Damir Jelić
3e2b95cdb9 doc: Update the main readme
Now with a logo.
2025-04-08 14:26:20 +02:00
Richard van der Hoff
dc3bd69af1 crypto: rename MaybeEncryptedRoomKey::Withheld to MissingSession
This is only used to indicate missing sessions, and the `code` is no longer
used, so let's rename the variant and remove the redundant field.
2025-04-08 12:47:08 +01:00
Richard van der Hoff
da14cef6c1 crypto: Factor out a EncryptForDevicesResultBuilder
We want to re-use all this logic, so putting it in a separate type will
help. Plus I think it's cleaner.
2025-04-08 12:47:08 +01:00
Ivan Enderlin
a1ac363383 refactor(base): Create account_data::for_room response processor.
This patch moves the `handle_room_account_data` method as the new
`account_data::for_room` response processor.

Instead of taking the `BaseClient` to fetch the room in `on_room_info`,
it now takes a `BaseStateStore`, which is safer and more straight to
the point.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
9e5ef57a5f refactor(base): AccountDataProcessor becomes a response processor.
This patch changes `AccountDataProcessor` to
`processors::account_data::global`. The next patch will introduce a
per-room account data processor, hence the renaming to `Global` to make
the difference between the twos.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
da86552648 refactor(base): Remove a pub(crate).
This patch removes a `pub(crate)`. This is a private method only.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
c0f4e90965 refactor(base): Rename a couple of variables.
This patch renames a couple of variables because it's important
to understand that those stripped state events are coming from the
`invite_state` value of a sliding sync response. This is a pretty
important detail.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
cf393bf8e1 refactor(base): verification must be behind e2e-encryption. 2025-04-08 13:20:31 +02:00
Ivan Enderlin
2ee0e175fa refactor(base): Create the state_events::collect_* response processors.
This patch creates the `state_events::collect_sync`
and `collect_stripped` response processors. It
removes the `BaseClient::deserialize_state_events` and
`deserialize_stripped_state_events` methods. It also removes a couple of
`Vec` allocations and a couple of clones.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
5c011a8400 refactor(base): Create the changes::save_and_apply response processor.
This patch creates the `changes::save_and_apply` response
processor. It consists of moving `BaseClient::apply_changes` plus
the code that is always around. This patch helps to remove the
`BaseClient::load_previous_ignored_user_list` method.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
b6b0c556b9 doc(crypto): Fix typos. 2025-04-08 13:20:31 +02:00
Ivan Enderlin
0c5f0b8d26 chore(base): Remove the with_e2ee internal module.
Just because it's clearer.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
e7e15ca280 refactor(base): Create the tracked_users response processor.
This patch creates the new `tracked_users::update_if_necessary` response
processor, and uses it in two places where the code was duplicated.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
222cffd502 chore(base): Move e2ee.rs to e2ee/to_device.rs. 2025-04-08 13:20:31 +02:00
Ivan Enderlin
cbef772eaa refactor(base): Move handle_room_member_event_for_profiles as a processor.
This patch moves the `handle_room_member_event_for_profiles`
function inside the collection of response processors under the name
`profiles::upsert_or_delete`.
2025-04-08 13:20:31 +02:00
Ivan Enderlin
e7e9c7bcf2 refactor(base): Use response_processors::Context everywhere.
This patch updates codes in `BaseClient` to use `Context` as much as
possible.
2025-04-08 13:20:31 +02:00
Richard van der Hoff
f1ea3e64d0 crypto: new result type for encrypt_session_for
Reduce the size of the tuple that this thing returns by defining a new result
type.

I haven't put the `share_infos` in the struct, because I'm going to reuse the
same struct for another method where `share_infos` aren't needed.
2025-04-08 12:18:21 +01:00
Richard van der Hoff
257deb4b94 crypto: factor out collect_recipients_for_share_strategy
For cases where we don't have a whole `EncryptionSettings`, we need
a finer-grained method.
2025-04-08 12:18:21 +01:00
Jorge Martín
3ece8e62b5 refactor(ffi): export NotificationItem::thread_id in the FFI layer 2025-04-08 11:53:39 +02:00
Jorge Martin Espinosa
f7f07e7389 fix(ui): extract NotificationEvent::thread_id to its own function (#4899) 2025-04-08 08:30:14 +00:00
dependabot[bot]
8d0928ff7c chore(deps): Bump tj-actions/changed-files
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 27ae6b33eaed7bf87272fdeb9f1c54f9facc9d99 to 6f67ee9ac810f0192ea7b3d2086406f97847bcf9.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](27ae6b33ea...6f67ee9ac8)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 6f67ee9ac810f0192ea7b3d2086406f97847bcf9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-08 09:13:50 +01:00
maan2003
39212db9ce fix(wasm): don't kill task on drop
Signed-off-by: Manmeet Singh <manmeetmann2003@gmail.com>
2025-04-08 09:10:24 +02:00
Johannes Marbach
056d4a79d0 refactor(send_queue): vectorize media handles on SendHandle (#4898)
This was broken out of
https://github.com/matrix-org/matrix-rust-sdk/pull/4838 and is a
preliminary step towards implementing
[MSC4274](https://github.com/matrix-org/matrix-spec-proposals/pull/4274).
The `media_handles` field on `SendHandle` is turned into a vector so
that it can hold handles for several media when upload a gallery later.

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2025-04-08 08:53:08 +02:00
Jorge Martin Espinosa
5753ca3a64 misc(ffi): add thread_id to NotificationItem (#4895)
This is needed to identify the event as being in a thread, and to reply
to it inside the thread instead of in the room's timeline.

<!-- description of the changes in this PR -->

- [ ] Public API changes documented in changelogs (optional)

<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by:
matrix-sdk-ffi/20250408
2025-04-07 17:53:44 +02:00
Damir Jelić
f3291d15c5 feat(multiverse): Move the details view to be beside the timeline
This allows us to view the debug screen at the same time as the
timeline. The details view can be to the right of the timeline or bellow
the timeline and we can switch using ALT-t.
2025-04-07 14:17:10 +02:00
Damir Jelić
413070aecb feat(multiverse): Shrink the room list to 25% of the screen 2025-04-07 14:17:10 +02:00
Damir Jelić
288251b1b5 feat(multiverse): Keep the timeline scrolled to the bottom 2025-04-07 14:17:10 +02:00
Damir Jelić
6c3e3bb519 feat(multiverse): Tweak the keybindings for the details view a bit 2025-04-07 14:17:10 +02:00
Damir Jelić
2e8b396c09 feat(multiverse): Add global keybindings to go directly into a details view 2025-04-07 14:17:10 +02:00
Damir Jelić
ed048af903 chore(multiverse): Fix some clippy warnings 2025-04-07 14:17:10 +02:00
Damir Jelić
28e475b1fc chore(multiverse): Get rid of an unused dependency 2025-04-07 14:17:10 +02:00
Damir Jelić
5a13bd5e76 feat(multiverse): Allow to backpaginate while looking at the room details 2025-04-07 14:17:10 +02:00
Damir Jelić
6966302467 fix(multiverse): Properly document the shortcuts on the help screen 2025-04-07 14:17:10 +02:00
Damir Jelić
fd6ce02d70 feat(multiverse): Select the first item in the developer settings 2025-04-07 14:17:10 +02:00
Damir Jelić
2debfd4c4d fix(multiverse): The encryption settings don't need a separate block anymore 2025-04-07 14:17:10 +02:00