Richard van der Hoff
a0807cb337
crypto-js: support npm run build:dev ( #1510 )
...
Building the crypto-js bindings in release mode is very slow and not really
necessary for local development.
`--release` is the default, so there is no need to specify it
explicitly. Instead, allow `wasm-pack` args to be specified by an env var, and
add a `build:debug` npm script which will build in debug mode.
2023-02-16 10:51:37 +00:00
Richard van der Hoff
480800b996
crypto-js: have share_room_key return ToDeviceRequests ( #1516 )
...
We already have support for proper `ToDeviceRequest` objects in
`outgoing_requests`, so let's use it in `share_room_key` as well. It's much
easier for the application to work with the proper object than an untyped json
blob.
2023-02-16 10:51:15 +00:00
Richard van der Hoff
5abab932db
ci: Fail coverage job if the coverage report can't be uploaded ( #1515 )
2023-02-16 09:36:43 +00:00
Damir Jelić
abef9fae1a
chore(bindings): Use tracing-android instead of android-logger
2023-02-16 09:59:16 +01:00
Jonas Platte
3f2b12c996
chore(base): Remove unused futures-channel dependency
2023-02-16 08:59:41 +01:00
Richard van der Hoff
826dc46ddf
Merge pull request #1511 from matrix-org/rav/trace-to-debug
...
crypto-js: log trace messages at debug
2023-02-15 18:13:06 +00:00
Richard van der Hoff
d9e455ab82
crypto-nodejs, crypto-js: prettify the javascript codebase ( #1509 )
2023-02-15 17:47:32 +00:00
kegsay
19b8ab409d
test: Add depends_on block for the sliding sync proxy
...
This prevents the proxy starting before postgres is ready, which
causes the proxy to panic.
2023-02-15 17:32:57 +00:00
Richard van der Hoff
99b61ef660
Remove redundant log_trace
2023-02-15 17:06:46 +00:00
kegsay
fb467b75e0
ci: Update sliding sync integration tests job
2023-02-15 17:03:29 +00:00
Jonas Platte
9e2fa13b9c
fix(sdk): Respect new server ordering when receiving duplicate events
2023-02-15 17:40:16 +01:00
Jonas Platte
38e2d0bdcd
fix(sdk): Fix day divider removal logic in timeline
2023-02-15 17:40:16 +01:00
Jonas Platte
e8d5d29d2c
chore(sdk): Improve tracing in TimelineEventHandler::add
2023-02-15 17:40:16 +01:00
Jonas Platte
88376e85cd
test(sdk): Remove TestTimeline::with_initial_events
...
It's not general enough for further inital event tests.
2023-02-15 17:40:16 +01:00
Jonas Platte
188aaecde3
feat(sdk): Keep Timeline event handlers around longer
...
… if the Timeline object itself is dropped, but something is still
subscribed to its changes.
2023-02-15 15:29:04 +01:00
Richard van der Hoff
d41753ea17
crypto-js: log trace messages at debug
...
Javascript's `console.trace` is not a good equivalent for Rust's
`Level::TRACE`.
In particular:
* `console.trace` causes a stacktrace to be written with each message
* Under nodejs, `console.trace` writes the message to `stderr`, while
`console.debug` writes to stdout
`console.trace` is therefore somewhat analogous to `console.error`.
Since we already include the log level in the message, we might as well just
send trace messages to `console.debug` rather than `console.trace`.
2023-02-15 12:50:42 +00:00
Richard van der Hoff
e16c113db0
crypto-js, crypto-nodejs: Run prettier in CI
2023-02-15 12:39:54 +00:00
Richard van der Hoff
3f8590f86d
crypto-nodejs, crypto-js: Run prettier on source code
2023-02-15 12:39:54 +00:00
Ivan Enderlin
a0bd88aefc
feat(crypto-nodejs) Implement OlmMachine.close
...
feat(crypto-nodejs) Implement `OlmMachine.close`
2023-02-15 12:48:45 +01:00
Jonas Platte
74056de8d7
fix(sdk): Deduplicate events coming from back-pagination
2023-02-15 12:41:26 +01:00
Jonas Platte
4f14728c91
chore(sdk): Add more spans and trace events to the timeline
2023-02-15 11:08:20 +01:00
Jonas Platte
20e082d416
refactor(sdk): Add a Date type for day divider logic
2023-02-15 10:08:05 +01:00
Jonas Platte
9e0ff4b9a9
fix(sdk): Handle remote echo on the first message of the day correctly
2023-02-15 10:08:05 +01:00
Jonas Platte
b57bd55204
refactor(sdk): Use .rev().find_map() instead of .rfind().and_then()
2023-02-15 10:08:05 +01:00
Jonas Platte
4cad934a6b
refactor(sdk): Simplify day divider timestamp conversion
2023-02-15 10:08:05 +01:00
Jonas Platte
aa2b2dfff4
test(sdk): Fix reference to renamed test case
2023-02-15 09:31:42 +01:00
Jonas Platte
6c2a9dae55
test(sdk): Use u64 instead of u32 for next_ts
...
It seems weird to artificially limit the number range to 32 bits there,
panicking inside a test on too large values is fine.
2023-02-15 09:31:42 +01:00
Jonas Platte
360864841e
test(sdk): Allow tests to set the next TS, use for day divider test
2023-02-15 09:31:42 +01:00
Jonas Platte
563ba884eb
test(sdk): Make next_ts part of TestTimeline
2023-02-15 09:31:42 +01:00
Jonas Platte
13ffadc32a
test(sdk): Add handle_live_redacted_message_event
2023-02-15 09:31:42 +01:00
Jonas Platte
e246735866
test(sdk): Shorten some method names
2023-02-15 09:31:42 +01:00
Ivan Enderlin
6593f61556
doc(crypto-nodejs): Add safety comment for OlmMachine.close.
2023-02-15 09:15:31 +01:00
Jonas Platte
423d6ace83
fix(sdk): Attempt to EX-android crash with more hacks
2023-02-14 17:53:21 +01:00
Jonas Platte
ce315a5229
chore: Use fully-qualified Docker image names
...
This brings us closer to being able to use our Docker setup with podman too.
2023-02-14 10:19:06 +01:00
Jonas Platte
ca1163c9cc
test: Remove trailing spaces from docker-compose.yml
2023-02-14 10:19:06 +01:00
Jonas Platte
e576af8267
test: Fix docker-compose.yml error
...
Seems to be accepted by some older versions of docker-compose, but not
by current ones.
2023-02-14 10:19:06 +01:00
Jonas Platte
118497f9ec
test: Remove unused dependency
2023-02-13 16:59:45 +01:00
Jonas Platte
ac06172cf2
test(sdk): Add timeline items accessor
2023-02-13 16:21:30 +01:00
Damir Jelić
2654e909be
feat(store-encryption): Add support to export/import the cipher using a key
...
This is useful for platforms which might want to avoid the cost of
password based key-derivation and have the ability to securely store an
encryption key.
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2023-02-13 14:08:45 +00:00
Damir Jelić
a1b1862479
docs(crypto): Explain a bit better what it means that a Device owns a room key
...
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com >
2023-02-13 15:00:15 +01:00
Ivan Enderlin
5001cef372
Merge pull request #1375 from Hywan/feat-crypto-nodejs-requests-more-types
2023-02-13 14:46:47 +01:00
Kévin Commaille
a6f74fa22c
fix(sled): Use proper table name for encoding key when redacting
...
Contrary to other tables that use their own name to encode their keys,
the `ROOM_INFO` table uses the `ROOM` table name to encode its keys.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-13 14:07:06 +01:00
Damir Jelić
56cfa8f4f9
fix(crypto): Always mark your own device as verified
2023-02-13 14:01:31 +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
enterprisey
e45bf9f9bd
docs(sdk): Improve read receipt/marker explanation
2023-02-13 12:05:35 +01:00
Jonas Platte
3a516a5fce
refactor(sqlite): Use internal Error in CryptoStore impl
2023-02-13 12:05:04 +01:00
Jonas Platte
9fc7d1c78b
refactor(indexeddb): Use IndexeddbCryptoStoreError in CryptoStore impl
2023-02-13 12:05:04 +01:00
Jonas Platte
c6f0e47077
refactor(crypto)!: Add an error type to the CryptoStore trait
...
This makes it easier to implement it. However, using a different error
type than CryptoStoreError is a non-trivial change, so left for the
coming commits for all stores except the memory store.
2023-02-13 12:05:04 +01:00
Kévin Commaille
96c796bb0e
ci: Silence clippy::extra_unused_type_parameters in affected crates
...
Triggers false positives.
See discussion in https://github.com/rust-lang/rust-clippy/issues/10319 .
Possibly fixed in https://github.com/rust-lang/rust-clippy/pull/10321 .
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-13 11:57:05 +01:00
Kévin Commaille
63fa645cea
fix(indexeddb): Fix implementation of SafeEncode for tuple of 5 elements
...
Regression introduced by merging commit 9707d73 after efdeba7
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-13 11:57:05 +01:00