Ivan Enderlin
e3b2e0fa3e
feat(base): Add the Verification request processor.
2025-04-07 13:52:29 +02:00
Ivan Enderlin
4619221429
feat(base): Add the DecryptLatestEvents response processor.
2025-04-07 13:52:29 +02:00
Ivan Enderlin
9b316ed405
feat(base): Add the E2EE response processor.
2025-04-07 13:52:29 +02:00
Ivan Enderlin
0a633ca75c
feat(base): Add the Context struct.
...
This patch introduces a new `Context` type that holds the state changes
and the room info notable updates. Processors will exchange this
context. That's the only data that is mutable and exchangeable between
processors.
2025-04-07 13:52:29 +02:00
Ivan Enderlin
2e57733f05
refactor(base): Move response_processors.rs into response_processors/account_data.rs.
...
This patch creates the `response_processors` module and
moves the existing `response_processors.rs` file into
`response_processors/account_data.rs`.
2025-04-07 13:52:29 +02:00
Kévin Commaille
b94be8d509
Upgrade tokio
...
To get rid of advisory
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-07 12:04:06 +02:00
Kévin Commaille
24e6d780fc
Upgrade Ruma to version 0.12.2
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-07 12:04:06 +02:00
Ivan Enderlin
d9157e5b83
refactor(ffi): Call methods on Room instead of redoing the same work.
...
This patch updates `Room::report_content` and `Room::report_room` to
call the same methods on `matrix_sdk` instead of re-implementing them.
2025-04-07 11:54:25 +02:00
dependabot[bot]
b4a8089b40
chore(deps): Bump openssl from 0.10.70 to 0.10.72
2025-04-04 23:28:09 +02:00
Kévin Commaille
a736dc9f96
doc(sdk): Cleanup changelog entries for Oidc/OAuth API changes
...
There were a lot of changes, and it was hard to follow, especially with
methods and types that changed and were then removed.
This groups everything under a single entry, with a short summary of
the changes, followed by a list of per-PR changes.
The detailed list is reorganized to put the biggest changes first, like
the renaming, and a few entries were cleaned up or removed, because
they mention a method or type that is removed in another entry.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-04 15:00:54 +02:00
Kévin Commaille
dd094ea38e
doc(oauth): Update docs
...
Make sure they are up-to-date.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-04 15:00:54 +02:00
Kévin Commaille
b2cd81a992
test(sdk): Fix compilation error
...
Introduced by merging #4886 and #4887 around the same time.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-04 14:45:06 +02:00
Ivan Enderlin
d5ceb5f99a
refactor(sdk): Reduce the size of Error::CrossProcessLockStore.
...
This patch boxes the error in `Error::CrossProcessLockStore` to reduce
the size of this variant (from 24 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
956386a3ed
refactor(sdk): Reduce the size of Error::SendQueueWedgeError.
...
This patch boxes the error in `Error::SendQueueWedgeError` to reduce the
size of this variant (from 32 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
b2a4032432
refactor(sdk): Reduce the size of Error::EventCache.
...
This patch boxes the error in `Error::EventCache` to reduce the size of
this variant (from 32 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
38378f7bae
refactor(sdk): Reduce the size of Error::OAuth.
...
This patch boxes the error in `Error::OAuth` to reduce the size of this
variant (from 160 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
e12264bcb6
refactor(sdk): Reduce the size of Error::WrongRoomState.
...
This patch boxes the error in `Error::WrongRoomState` to reduce the
size of this variant (from 24 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
385df955c3
refactor(sdk): Reduce the size of Error::SlidingSync.
...
This patch boxes the error in `Error::SlidingSync` to reduce the size of
this variant (from 72 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
47a1db9e16
refactor(sdk): Reduce the size of Error::QrCodeScanError.
...
This patch boxes the error in `Error::QrCodeScanError` to reduce the
size of this variant (from 72 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
ed82f07d7d
refactor(sdk): Reduce the size of Error::EventCacheStore.
...
This patch boxes the error in `Error::EventCacheStore` to reduce the size of
this variant (from 32 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
4ddd1468c2
refactor(sdk): Reduce the size of Error::StateStore.
...
This patch boxes the error in `Error::StateStore` to reduce the size of
this variant (from 40 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
b274d36e11
refactor(sdk): Reduce the size of Error::MegolmError.
...
This patch boxes the error in `Error::MegolmError` to reduce the size of this
variant (from 72 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
7ae82f3afb
refactor(sdk): Reduce the size of Error::OlmError.
...
This patch boxes the error in `Error::OlmError` to reduce the size of this
variant (from 80 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
111306b411
refactor(sdk): Reduce the size of Error::CryptoStoreError.
...
This patch boxes the error in `Error::CryptoStoreError` to reduce the
size of this variant (from 72 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
c8fb8ad9ca
refactor(sdk): Reduce the size of Error::Http.
...
This patch boxes the error in `Error::Http` to reduce the size of this
variant (from 160 bytes to 16 bytes).
2025-04-04 13:25:55 +02:00
Ivan Enderlin
2f7525c3c8
chore(base): Reduce the size of DependentQueuedRequestKind.
...
This patch boxes `local_echo` in
`DependentQueuedRequestKind::FinishUpload`, this variant' size is 512
bytes, compared to the second largest variant which is 104 bytes. To
reduce the global size of this enum, `local_echo` is now a `Box<_>`.
2025-04-04 13:25:55 +02:00
Ivan Enderlin
511fc96835
chore(base): Replace iter().any() by contains().
...
This is usually faster to use `contains()` than `iter().any()` on
a slice.
See https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains .
2025-04-04 13:25:55 +02:00
Ivan Enderlin
cb539bc72b
chore(base): Reduce the size of AnySyncOrStrippedState.
...
This patch reduces the size of `anySyncOrStrippedState`. The `Sync`
variant is 528 bytes, the `Stripped` variant is 232. First off, there is
a non-negligible difference in size between the two, but still, we can
reduce the size of the enum by boxing all values.
2025-04-04 13:25:55 +02:00
Kévin Commaille
2b450a0a6a
chore: Add changelog for Client::logout()
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-04 13:14:55 +02:00
Kévin Commaille
fc93690d1f
test(sdk): Add test for Client::logout()
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-04 13:14:55 +02:00
Kévin Commaille
43431b88da
feat(sdk): Add Client::logout() to log out regardless of the auth API
...
It simplifies code for users, and avoids to have to match on
`AuthApi`, which is a non-exhaustive enum.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-04 13:14:55 +02:00
Ivan Enderlin
13ca27d66a
chore(cargo): Update eyeball and imbl.
...
This patch updates `eyeball`, `eyeball-im` and `eyeball-im-util` from
`main` branch to latest releases.
This patch also updates `imbl` to 5.0.
2025-04-04 10:09:12 +02:00
Stefan Ceriu
9f7179263a
fix(ffi): correctly populate all audio content fields when converting from FFI types to Ruma
...
- fixes forwarding audio and voice messages that would previously show up as files because of missing fields
2025-04-03 15:50:17 +03:00
Kévin Commaille
c8da9cb462
refactor(oauth): Remove the issuer from OAuthAuthData
...
It is actually unused, and now that we only need homeserver URLs for
static registrations, users don't need to access it easily.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-03 12:52:17 +03:00
Kévin Commaille
678938951e
chore: Update changelog for OAuthRegistrationStore removal
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-03 12:52:17 +03:00
Kévin Commaille
8883e081af
refactor(oauth): Remove OAuthRegistrationStore
...
MSC2966 was updated, clients should re-register for every log in, so we
don't need to store the client IDs between logins.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-04-03 12:52:17 +03:00
Johannes Marbach
c4d9ec98c3
feat!(ffi): merge send_reply and send_thread_reply ( #4880 )
...
This pushes down the `Reply` struct to be provided when sending a reply, and merges the `send_reply` and `send_thread_reply` FFI functions.
This is a small follow-up on https://github.com/matrix-org/matrix-rust-sdk/pull/4852/files#r2016594024 .
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
2025-04-03 11:19:21 +02:00
Johannes Marbach
dccd836dc6
feat!(timeline): allow sending media as (thread) replies ( #4852 )
...
This makes it possible to reply with a media, as part of a thread or not.
Fixes #4835 .
---------
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
2025-04-02 12:25:06 +00:00
Benjamin Bouvier
c719cd11f3
fix(event cache): properly clear all rooms, including those sleeping in the store backend
2025-04-02 13:54:43 +02:00
Benjamin Bouvier
42133a60c8
fix(ffi): use EventCache::clear_all_rooms() to clear the events caches
...
Clearing only the store backend, while not emptying the in-memory linked
chunks, will lead to out-of-sync state across the in-memory caches and
the database. As a result, it's safer to call the existing
`EventCacheInner::clear_all_rooms`, which will clear all the rooms
manually.
2025-04-02 13:54:43 +02:00
Benjamin Bouvier
d30dc7177f
refactor(sqlite): rename gaps to gap_chunks / events_chunks to event_chunks
...
And some comments have been tweaked too.
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
e42be87798
test(event cache): add tests for save_event() and find_event_relations()
...
And fix the sql backend \o/
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
524040b33c
refactor(event cache): have EventCacheStore::clear_all_rooms_chunks delete all the events' contents
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
0227b3f554
refactor(event cache): regroup code to compute the filter strings
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
6a076b0989
refactor(event cache): don't return the event itself, in find_event_with_relations
...
And rename it `find_event_relations`.
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
9b1a5b7102
refactor(event cache): don't have find_event_with_relations return redaction events
...
A redaction event would be either applied a priori (by the server, when
returning the sync response), or the event cache would handle it, and
redact it in the database; in any case, we'd never see the original
event in its non-redacted form, so there's no point in returning the
redaction event itself.
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
0bb72064b5
refactor(event cache): don't have find_event_with_relations return replies
...
It's unclear whether it's useful, especially in the case where it would
return an entire reply chain. It's not possible to filter in replies
only, using the function either, which is a sign that replies shouldn't
be indexed, IMO. In any case, that's something we can add back in the
future, if we want to.
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
8af68d7389
feat(event cache): get the transitive closure of related events when getting an event's relations
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
cde0a9e24b
refactor(event cache): get rid of the AllEventsCache
2025-04-02 13:26:15 +02:00
Benjamin Bouvier
9423e41a06
refactor(event cache): use the store methods to retrieve an event by id, with or without its relations
2025-04-02 13:26:15 +02:00