Benjamin Bouvier
736aa0351c
ffi: add our own macro for processing exports
...
Including one that will always warn if used with async functions, and
the other one always setting the tokio runtime if used for async stuff.
2024-10-08 17:11:39 +02:00
Jorge Martín
1fc3450eac
ffi & sdk: add room knocking to Client
2024-10-08 12:07:01 +02:00
Benjamin Bouvier
19b9a73ecc
ffi: add async_runtime annotation for impl block with async fun
2024-10-08 11:12:01 +02:00
Ivan Enderlin
6f0fbf92e4
Revert "Revert "chore(ui,ffi): Remove the RoomList::entries method.""
...
This reverts commit af390328b5 .
2024-10-07 15:58:38 +02:00
Andy Balaam
6c7acf6faa
ffi: Expose the master_key method on UserIdentity
2024-10-07 13:31:38 +01:00
Andy Balaam
181ee643b1
crypto: Expose a way to pin a user's identity
2024-10-07 13:31:38 +01:00
Doug
a12a46b777
ffi: Add caption/formatted_caption to media timeline items.
...
Also includes the computed filename too.
2024-10-07 14:11:19 +02:00
Doug
93fce02606
chore: Update Ruma to add media caption methods.
...
fixup
fixup
2024-10-07 14:11:19 +02:00
Andy Balaam
5d46b35d95
crypto: Rename some straggling 'Identities' to 'Identity'
...
The main enum was renamed to `UserIdentity` and some aliases and
comments had not kept up.
2024-10-04 14:37:12 +01:00
Richard van der Hoff
1d1863d323
crypto: Give decrypt_room_event a new return type
...
I want to do a bit of a refactoring on `TimelineEvent`, so let's start by
giving `decrypt_room_event` its own return type.
2024-10-03 16:23:45 +01:00
Andy Balaam
c5f5bc8496
crypto: FFI bindings for subscribe_to_identity_status_changes
2024-10-03 13:24:24 +01:00
Valere
6de676f491
Merge pull request #4046 from matrix-org/valere/trust_decoration_decryption_trust_req
...
crypto: Expose with_decryption_trust_requirement for ClientBuilder
2024-10-02 12:13:15 +02:00
Pratik Deshpande
f7d99cc506
Added a binding for custom login using JWT
2024-10-01 12:33:06 +03:00
Valere
60319914e1
code review | quick doc and test cleaning
2024-10-01 10:19:25 +02:00
Valere
806ee13aa0
ffi: Expose room_decryption_trust_requirement for ClientBuilder
2024-10-01 10:19:25 +02:00
Damir Jelić
e7bc510313
refactor: Rename the UserIdentities enum into UserIdentity
2024-09-30 18:04:04 +02:00
Jorge Martín
743799fbd2
ffi: move the dependency override from ffi/Cargo.toml to the root one
...
This seems to be the only way to make the log rotation fix work and avoid build warnings like:
```
warning: patch for the non root package will be ignored, specify patch at the workspace root:
package: matrix-rust-sdk/bindings/matrix-sdk-ffi/Cargo.toml
workspace: = matrix-rust-sdk/Cargo.toml
Finished `dev` profile [unoptimized] target(s) in 0.30s
```
2024-09-30 10:22:41 +02:00
Jorge Martín
ac61fc8830
ffi: create EventShieldsProvider to load shields on demand in the clients
2024-09-27 17:22:55 +02:00
Jorge Martín
52898fa526
ffi: create EventOrTransactionId enum for functions that can receive both
2024-09-27 17:22:55 +02:00
Jorge Martín
263386ea53
ffi: use event_or_transaction_id parameter name for Timeline functions that can take both
2024-09-27 17:22:55 +02:00
Jorge Martín
0082fbc0b4
ffi: add EventTimelineItemDebugInfoProvider to lazily retrieve an event's debug info
2024-09-27 17:22:55 +02:00
Jorge Martín
281a79ffc6
ffi: make From implementations for some event types use values, not references
2024-09-27 17:22:55 +02:00
Jorge Martín
bdf303aa57
ffi: remove unused unwrap_or_clone_arc_into_variant macro
2024-09-27 17:22:55 +02:00
Jorge Martín
7dcf45562c
ffi: fix bindings not using Arc wrappers
2024-09-27 17:22:55 +02:00
Jorge Martín
548c66750f
sdk-ui: Move the event-fetching logic for edit and redact functions to the sdk-ui crate where they can be tested, to the edit_by_id and redact_by_id functions.
...
Added some tests for those, based on the existing ones.
2024-09-27 17:22:55 +02:00
Jorge Martín
67df36f733
ffi: Turn EventTimelineItem into a record type
...
This improves parsing times in mobile Clients. On Android, this means a 5-10x faster parsing of timeline events.
To do that I had to:
- Make functions like `edit/redact/forward` take an identifier (EventId/TransactionId) instead of the actual event. This id will be used to look for the actual SDK timeline event in the timeline. This change will make these functions a bit less performant.
- Make `InReplyToDetails` an object instead since a record can't recursively contain itself.
- Turn `EventTimelineItem` into a record type. Do the same with `Message`, which is now `MessageContent`.
2024-09-27 17:22:55 +02:00
Damir Jelić
e61fb45504
ffi: Allow recovery to be enabled using a passphrase
2024-09-27 17:04:00 +02:00
Jorge Martín
9b7f89c183
ffi: use fork of tracing crate with a fix for Android logs rotation
2024-09-27 10:37:21 +02:00
Jorge Martín
decdd6f47e
crypto-ffi: update the x86-64 Android workaround to match matrix-sdk-ffi
...
This workaround was applied to `matrix-sdk-ffi` and it should be used here too
2024-09-17 16:44:52 +02:00
Stefan Ceriu
ea4b9635c9
ffi: add another method that tells the client if account deactivation is supported
...
- i.e. only works for `m.login.password`
2024-09-16 17:52:39 +03:00
Stefan Ceriu
5b79a9843e
ffi: expose method to allow user account deactivate for m.login.password based accounts
2024-09-16 17:52:39 +03:00
Ivan Enderlin
af390328b5
Revert "chore(ui,ffi): Remove the RoomList::entries method."
...
This reverts commit 98a3a0b3c4 .
2024-09-16 12:02:03 +02:00
Ivan Enderlin
98a3a0b3c4
chore(ui,ffi): Remove the RoomList::entries method.
...
This method is now private inside `matrix_sdk_ui` and removed
from `matrix_sdk_ffi`. This method is returning a stream of rooms,
but updates on rooms won't update the stream (only new rooms
will be seen on the stream). Nobody uses it as far as I know, and
`entries_with_dynamic_adapters` is the real only API we want people
to use.
2024-09-16 11:50:11 +02:00
Doug
a9ed62284e
ffi: Expose the server URL to the app too.
2024-09-13 19:32:08 +03:00
Doug
2532c5227f
ffi: Add the registration helper URL to the ElementWellKnown file.
2024-09-13 18:37:45 +03:00
Jorge Martín
6ae7d3c017
ffi: add FFI fn for Client::await_room_remote_echo(&room_id)
2024-09-12 13:21:39 +02:00
Damir Jelić
9e7ab635c6
bindings: Expose the PkEncryption stuff in the crypto crate bindings ( #3971 )
2024-09-12 09:54:46 +00:00
Ivan Enderlin
075f3fa9d2
feat(ffi): Add RoomInfo::creator.
...
This patch adds the `matrix_sdk_ffi::RoomInfo::creator` field that
simply copies the value from `matrix_sdk_base::Room::creator()`.
2024-09-11 15:19:41 +02:00
Jorge Martin Espinosa
31e6df7234
timeline: unify edit and edit_poll functions ( #3951 )
...
## Changes
Takes care of [this
TODO](9df1c48079/crates/matrix-sdk-ui/src/timeline/mod.rs (L520) ).
- sdk & sdk-ui: unify `Timeline::edit` and `Timeline::edit_polls`, the
new fn takes an `EditedContent` parameter now, which includes a
`PollStart` case too.
- ffi: also unify the FFI fns there, using `PollStart` and a new
`EditContent` enum that must be passed from the clients like:
```kotlin
val messageContent = MessageEventContent.from(...)
timeline.edit(event, EditedContent.RoomMessage(messageContent))
```
Since the is mainly about changing the fns signatures I've reused the
existing tests, including one that used `edit_poll` that now uses the
new fn.
---------
Co-authored-by: Benjamin Bouvier <benjamin@bouvier.cc >
2024-09-11 08:50:51 +00:00
Benjamin Bouvier
729ba3e22b
ffi: rename RustShieldState to SdkShieldState
...
This is all Rust code, after all :)
2024-09-10 11:20:52 +02:00
Doug
83cc0acf7b
ffi: Expose RoomSendQueue::unwedge to allow resending.
2024-09-09 17:47:06 +02:00
Jorge Martín
10a0d59012
sdk-ui: fix max concurrent requests for pinned events timeline.
2024-09-09 09:37:50 +02:00
Damir Jelić
1eecb2d603
ui: Remove the e2e-encryption feature from the matrix-sdk-ui crate
...
It does not make much sense to create an UI client that does not support
end-to-end encryption, besides disabling the feature was broken for
quite some time.
2024-09-06 15:37:18 +02:00
Hubert Chathi
62d4abd454
crypto: add DecryptionSettings parameter to functions
2024-09-04 14:59:21 +01:00
Stefan Ceriu
14ee78c54d
ffi: expose methods for manually withdrawing certain users' verification or trusting their devices and resending failed messages
2024-09-04 15:39:35 +03:00
Hubert Chathi
1dd8c908c5
crypto: Error when sending keys to previously-verified users with identity-based strategy ( #3896 )
2024-09-03 18:06:32 +01:00
Stefan Ceriu
5b14fe6f34
crypto: fix OIDC cross-signing reset flows after backend authorization failure response change ( #3933 )
2024-09-03 14:43:46 +00:00
Benjamin Bouvier
06fc220268
ffi: use the send queue when sending an edit with Room::edit
...
This will make it possible to send updates to observers, update local
echoes, and so on, making it closer to the edit functions from the
timeline.
2024-08-29 09:34:31 +03:00
Benjamin Bouvier
e1fe1ca129
timeline: add support for local reactions to local echoes
2024-08-28 16:49:46 +02:00
Benjamin Bouvier
468ee53644
sliding sync version(chore): address review comments
2024-08-27 17:25:12 +02:00