Commit Graph

87 Commits

Author SHA1 Message Date
Jonas Platte
f21946ef06 sdk: Avoid raw JSON in debug strings 2023-04-13 16:00:50 +02:00
Jonas Platte
cd33d8ca38 Always use RwLock and Mutex from tokio
… instead of async-lock, which we previously used on wasm.
2023-03-28 21:08:57 +02:00
Damir Jelić
8652cdf752 Test the VerificationState migration 2023-03-21 12:02:31 +01:00
Damir Jelić
32e2ea0288 Allow the old VerificationState enum to be deserialized into the new one 2023-03-21 12:02:31 +01:00
Jonas Platte
39a4dc911f Remove event contents from (Sync)TimelineEvent Debug impls 2023-03-20 13:21:41 +01:00
Valere
248b8db309 Extended verification states
Co-authored-by: Damir Jelić <poljar@termina.org.uk>
Co-authored-by: Denis Kasak <dkasak@termina.org.uk>
2023-03-15 18:16:31 +01:00
Jonas Platte
ee6c0d9486 Simplify TimelineEvent construction 2023-03-13 16:31:19 +01:00
Kévin Commaille
84ff8980f3 sdk-base: Expose calculated push actions on event
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2023-03-13 13:47:06 +01:00
Jonas Platte
01a66d4874 Fix unnecessary cfg(all()) 2023-03-06 18:25:16 +01:00
Richard van der Hoff
8d642784bb fix: remove dependency on broken wasm_timer crate
`wasm_timer` doesn't work outside the browser, which prevents it being used in
tests.

We can replace it with `gloo-timers` wich uses the standard Javascript
`setTimeout`.
2023-02-13 12:41:36 +01:00
Jonas Platte
b82cd7fa5a refactor(common): Simplify wasm timeout implementation
… and remove an infinitely-recursive From impl in the process.
2023-01-04 18:59:11 +01:00
Jonas Platte
a5080b6ed9 chore: Upgrade Ruma 2022-12-19 13:50:02 +01:00
Jonas Platte
bb6145d581 refactor!: Move large parts of deserialized_responses to matrix-sdk-base 2022-11-17 11:33:37 +01:00
Jonas Platte
975626a4f8 refactor(common)!: Remove unused TimelineSlice type 2022-11-17 11:33:37 +01:00
Benjamin Kampmann
a443e7277d feat: Add sliding sync timeline events and extensions (#1054)
Add general extension framework for sliding sync, implementing the e2ee, to-device and account-data extensions as per existing proxy implementation. Add a new (ffi exposed) function to use activate the extensions.

Also extends jack-in to have permanent login and storage support now, rather than posting an access token and expose messages inside the sliding-sync layer to actually use the decrypted messages if given. Contains a lot of fixes around these aspects, too, like uploading any remaining messages from the olm-machine on every sliding-sync-request or processing even if no room data is present (which can happen now as processing only extensions might takes place).
2022-10-25 13:42:43 +02:00
Damir Jelić
67d968d4fa refactor(crypto): Remove the device ID from the megolm v2 m.room.encrypted content 2022-10-12 14:37:05 +02:00
Jonas Platte
b12da9d4db refactor!: Move JS-specific functionality behind a Cargo feature
… for matrix-sdk, matrix-sdk-base, matrix-sdk-common and matrix-sdk-crypto.
matrix-sdk-indexeddb as well as the JS bindings and wasm_command_bot are
left as-is because they will likely always require JS.
2022-09-20 14:08:21 +02:00
Damir Jelić
aac41fc82a refactor(crypto): Remove the forwarding chains
These aren't really useful since they can be easily spoofed by any room
key forwarder.
2022-09-12 16:03:05 +02:00
Jonas Platte
d427632230 chore: Add more backticks in comments 2022-08-25 18:09:13 +02:00
Jonas Platte
6ddc8ba36f refactor!: Rename [Sync]RoomEvent to [Sync]TimelineEvent 2022-08-25 18:09:13 +02:00
Jonas Platte
4be2f3aa04 chore: Upgrade ruma 2022-08-25 18:09:13 +02:00
Benjamin Kampmann
549c829000 chore: Update ruma 2022-08-18 15:52:08 +02:00
Damir Jelić
6d60acfff4 chore(common): Fix a clippy warning 2022-08-13 09:58:57 +02:00
Jonas Platte
4914c595e9 fix(sdk): Further relax event / notification handler bounds on WASM
This allows capturing non-`Send` / -`Sync` values in handler closures.
2022-08-10 12:54:36 +02:00
Jonas Platte
ad80839ffd fix(sdk): Make event handler futures non-Send on wasm 2022-08-09 14:25:57 +02:00
Jonas Platte
0701561e45 feat(common): Add SendOutsideWasm, SyncOutsideWasm 2022-08-09 14:25:57 +02:00
Jonas Platte
0b7d0aa780 chore(common): Make timeout tests deterministic
… as well as simpler, and faster.
2022-08-03 14:54:43 +02:00
docweirdo
744bd8d0d2 feat(common): Add a generically usable timeout function 2022-08-01 18:23:30 +02:00
Benjamin Kampmann
d9f3b257b4 Apply suggestions from code review
Co-authored-by: Ivan Enderlin <ivan@mnt.io>
2022-07-05 14:38:53 +02:00
Benjamin Kampmann
fd38c757e4 feat(sdk): Expose details of invite for invited room 2022-07-01 19:44:27 +02:00
Jonas Platte
0fad7b60a9 feat(base): Properly handle redacted m.room.member events 2022-05-09 12:38:22 +02:00
Jonas Platte
dc08d5f62b chore: Update MemberEvent to allow redacted member events 2022-05-09 12:38:22 +02:00
Jonas Platte
985c7d7b36 chore: Inline From trait implementations for MemberEvent
They were each just used in a single place.
2022-05-09 12:38:22 +02:00
Benjamin Kampmann
392d48ba01 Merge remote-tracking branch 'origin/main' into gnunicorn/issue133 2022-05-02 11:51:26 +02:00
Jonas Platte
f8b9ec9626 chore: Remove ruma re-export from matrix-sdk-common
The user-facing re-exports in matrix-sdk-base and matrix-sdk remain.
2022-04-29 17:13:22 +02:00
Jonas Platte
c3d9a60067 chore: Remove async_trait from matrix-sdk-common 2022-04-29 17:13:22 +02:00
Jonas Platte
4b1c77ec5a chore: Use js Date.now() support from Ruma 2022-04-29 13:03:49 +02:00
Benjamin Kampmann
18864d9722 chore: Merge remote-tracking branch 'origin/main' into gnunicorn/issue133 2022-04-29 10:27:33 +02:00
Benjamin Kampmann
16ec5fe9ff chore: Merge remote-tracking branch 'origin/main' into gnunicorn/issue617 2022-04-28 11:23:32 +02:00
Benjamin Kampmann
aff106f0d6 style: cargo fmt 2022-04-28 11:08:27 +02:00
Benjamin Kampmann
9c80774140 feat(common-utils): helper for modified MilliSecondsSinceUnixEpoch 2022-04-28 11:06:35 +02:00
Benjamin Kampmann
628de09938 rename Full -> Original 2022-04-27 12:22:19 +02:00
Benjamin Kampmann
703a95c486 grumbles 2022-04-27 12:21:06 +02:00
Benjamin Kampmann
592a9338eb style, and other fixes 2022-04-26 17:27:18 +02:00
Benjamin Kampmann
61ea1c9003 Merge remote-tracking branch 'origin/main' into gnunicorn/issue133 2022-04-26 15:24:13 +02:00
Benjamin Kampmann
cfeda54fc6 fix(store): combine stripped and regular membership and allow fetching that 2022-04-26 13:35:06 +02:00
Jonas Platte
08fd85ea09 chore: Upgrade Ruma 2022-04-26 11:40:54 +02:00
Damir Jelić
95a3fe136d refactor(crypto): Use the ruma time types for the Session timestamps 2022-04-19 14:03:31 +02:00
Jonas Platte
ad538f3f28 Upgrade Ruma 2022-04-12 14:39:30 +02:00
Jonas Platte
0dafd8cd65 chore: Update all unit test module names to the conventional 'tests' 2022-04-08 12:35:54 +00:00