Commit Graph

12440 Commits

Author SHA1 Message Date
Ivan Enderlin
ef137730cb doc(sdk): Add #5269 to the CHANGELOG.md. 2025-06-23 15:45:28 +02:00
Ivan Enderlin
45caaffb26 refactor(sdk): Rename RoomEventCacheListener to RoomEventCacheSubscriber.
This patch removes a name ambiguity around _listener_ vs. _subscriber_.
Both terms are used to talk about `RoomEventCacheListener`. We usually
use the term _subscriber_ for the type being returned by a `subscribe`
method. The code refers to this sometimes as listener, sometimes
as subscriber, sometimes both in the same sentence, which can be very
confusing! This patch solves this by using the _subscriber_ term only.
2025-06-23 15:45:28 +02:00
Ivan Enderlin
50c3217353 doc(sdk): Document the side-effect of RoomEventCacheListener. 2025-06-23 15:45:28 +02:00
Ivan Enderlin
b5dafd9798 chore(sdk): Rename variables.
This patch renames `tx` and `rx` to `auto_shrink_sender` and
`auto_shrink_receiver` to clarify the code.
2025-06-23 15:45:28 +02:00
Ivan Enderlin
5a39fd051b chore(sdk): Rename a variable.
This patch renames a variable to match the `EventCacheDropHandles`
field's name.
2025-06-23 15:45:28 +02:00
Andy Balaam
ff52cf36dd refactor(crypto): Rename raw_event to processed_event to reflect its changed state 2025-06-23 11:34:59 +02:00
Daniel Salinas
25d217cc6f Address timeline panic to avoid resume_unwind on Wasm 2025-06-23 10:06:04 +02:00
Jonas Platte
2116ad82df refactor: Move comments with visual indentation
Visual indentation was removed from rustfmt's style defaults in the 2024
edition of the style rules.
2025-06-23 09:37:45 +02:00
Jonas Platte
fe4109cb9a refactor: Remove {self} imports
They are only semantically different if a macro of the same name exists,
in which case the foo::{self} import only imports foo-the-module, not
foo-the-macro.
2025-06-23 09:37:45 +02:00
Jonas Platte
41f107e5ba refactor: Remove useless comment
This comment was added in the very first commit for matrix-sdk-ffi and I
have no recollection of what was meant there.
2025-06-23 09:37:45 +02:00
Daniel Salinas
ab699a90f1 Adjust platform init on Wasm to avoid tokio environment
The multi-threaded tokio environment does not work in Wasm.
console_error_panic_hook turns rust panics into JS console statements
2025-06-23 09:47:08 +03:00
Daniel Salinas
ddee7f8ccd feat(wasm): Small fixes for imports in ffi timeline (#5263)
Adjust some imports to use our shims to support Wasm.

Signed-off-by: Daniel Salinas
2025-06-20 22:22:15 +02:00
Daniel Salinas
2ab5ab527b refactor(wasm): Remove special Send/Sync behavior for Wasm on a crypto-store error (#5265)
Not necessary it turns out

Signed-off-by: Daniel Salinas
2025-06-20 22:18:32 +02:00
Daniel Salinas
53e3b90436 feat(wasm): Mark CapabilitiesProvider::acquire_capabilities as SendOutsideWasm (#5262)
Correct an accidental recent addition of a `Send` trait instead of
`SendOutsideWasm`

Signed-off-by: Daniel Salinas
2025-06-20 21:58:11 +02:00
Daniel Salinas
08e1d3876b Reorganize QRCode related functionality into its own file
We have a working implementation of the additional forms of QR Code login
of MSC4108. This commit moves the existing code into its own file
to make future updates easier to follow.
2025-06-20 14:24:28 +01:00
Richard van der Hoff
c3179ea5ed Merge pull request #5260 from matrix-org/rav/join_room_logging
sdk: add logging to `Room::join()`
2025-06-20 12:12:05 +01:00
Daniel Salinas
9676daee5a feat(wasm): Remove MediaFileHandle from ffi on Wasm platforms (#5249)
Remove the MediaFileHandle concept from the matrix-sdk-ffi crate on Wasm
platforms. File handles are not supported in the browser.

Signed-off-by: Daniel Salinas
2025-06-19 18:55:23 +02:00
Daniel Salinas
798cece4a2 feat(wasm): Add lib to matrix-sdk-ffi target (#5242)
The uniffi tool for generating JS/Wasm bindings utilizes rust as its
intermediate language.

As a result, the 'target' uniffi annotated library needs to be marked as
a 'lib' so that the generated rust code can utilize it to generate the
Wasm create + typescript bindings.

Signed-off-by: Daniel Salinas
2025-06-19 18:16:16 +02:00
Doug
06b387101b chore: Fix changelogs after rebase 2025-06-19 17:40:04 +02:00
Doug
675963ec4b chore: Make the RTC foci crash fix type-safe. 2025-06-19 17:40:04 +02:00
Doug
d30dae3322 fix: Handle a crash accessing the RTC foci when the well-known was None. 2025-06-19 17:40:04 +02:00
Doug
bdb640a126 ffi: Expose a check for LiveKit RTC support. 2025-06-19 17:40:04 +02:00
Doug
ea28234d95 sdk: Cache the client well-known file and add Client::rtc_foci which uses it. 2025-06-19 17:40:04 +02:00
Doug
c74295c604 chore: Refactor ServerCapabilities into ServerInfo.
It has nothing to do with /capabilities so is confusing. We can use this new struct to combine the well-known response into a single cache too.
2025-06-19 17:40:04 +02:00
Michael Goldenberg
ec30e7b85c docs(indexeddb): add license to event_cache_store::types file
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
fd17c28ebb refactor(indexeddb): add convenience functions for (de)serializing Indexed types
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
841131f127 refactor(indexeddb): add indexing trait impls for gap
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
a22d592bf1 refactor(indexeddb): add chunk identifier into gap type
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
1a32aa59a6 refactor(indexeddb): add indexing trait impls for event
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
a99df7e1d8 refactor(indexeddb): add indexing trait impls for chunk
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
3e37f9d0ad refactor(indexeddb): expose current version and keys used in event cache store database 2025-06-19 17:26:30 +02:00
Michael Goldenberg
2689e2d25a refactor(indexeddb): add trait for constructing key bounds for indexed types in event cache store
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
2cfba4cd9b refactor(indexeddb): add trait for encoding keys for indexed types in event cache store
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Michael Goldenberg
1bce2af93c refactor(indexeddb): add trait for converting between high-level types and indexed types in event cache store
Signed-off-by: Michael Goldenberg <m@mgoldenberg.net>
2025-06-19 17:26:30 +02:00
Stefan Ceriu
47c8df0ef8 chore(ffi): move the room power levels to their own file and restructure the code 2025-06-19 17:55:48 +03:00
Stefan Ceriu
9f32dfe9a0 change(ffi): expose the full RoomPowerLevels object and move corresponding methods to it.
This patch expands on the already existent `RoomPowerLevels` record (which it renames to `RoomPowerLevelsValues` to work around uniffi not exposing public fields) and nests them inside a new exported object that also provides methods for retrieving the actions that an user can take, methods moved from the room object.
This reduces the amount of async calls the clients need to make, simplifies the API and groups the code better together.
2025-06-19 17:55:48 +03:00
Daniel Salinas
040fd6c736 Run cargo fmt 2025-06-19 16:16:59 +02:00
Daniel Salinas
4dac175db0 Back to other phrasing to make CI run 2025-06-19 16:16:59 +02:00
Daniel Salinas
5faf97cf99 Rework phrasing to make CI run 2025-06-19 16:16:59 +02:00
Daniel Salinas
7236b80b3b Adjust language to make CI do something 2025-06-19 16:16:59 +02:00
Daniel Salinas
79b0941687 Remove lib 2025-06-19 16:16:59 +02:00
Daniel Salinas
ad001e475f Update bindings/matrix-sdk-ffi/Cargo.toml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
2025-06-19 16:16:59 +02:00
Daniel Salinas
5106d55be9 Update bindings/matrix-sdk-ffi/Cargo.toml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
2025-06-19 16:16:59 +02:00
Daniel Salinas
9771b99395 Update bindings/matrix-sdk-ffi/Cargo.toml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
2025-06-19 16:16:59 +02:00
Daniel Salinas
2c287e706f Update bindings/matrix-sdk-ffi/Cargo.toml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
2025-06-19 16:16:59 +02:00
Daniel Salinas
fffff783d4 Spell check 2025-06-19 16:16:59 +02:00
Daniel Salinas
b047bd0dc6 Add refactor flag 2025-06-19 16:16:59 +02:00
Daniel Salinas
28b3b6aedf Update bindings/matrix-sdk-ffi/CHANGELOG.md
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
2025-06-19 16:16:59 +02:00
Daniel Salinas
171974a44b Add note about bundled-sqlite 2025-06-19 16:16:59 +02:00
Daniel Salinas
f53302a7a0 Code review feedback, improved documentation 2025-06-19 16:16:59 +02:00