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
Kévin Commaille
0d4fac5962
test(base): Test collision between threaded and unthreaded receipts in store
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-12 11:04:26 +01:00
Kévin Commaille
2e497198f8
fix(stores): Separate receipts by thread
...
The key encoding in key-value stores is backwards-compatible so
old receipts are counted as unthreaded receipts.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-12 11:04:26 +01:00
Kévin Commaille
9707d73ead
fix(indexeddb): Fix broken raw redacted state events
...
A fix for (de)serialization of redacted state events in Ruma made
old events undeserializable.
Bump the DB version.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-11 22:54:38 +01:00
Kévin Commaille
5ae84a9a80
fix(sled): Fix broken raw redacted state events
...
A fix for (de)serialization of redacted state events in Ruma made
old events undeserializable.
Bump the DB version.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2023-02-11 22:54:38 +01:00
Jonas Platte
57c3224b6b
ci: Work around not being able to use matrix variables inside uses
2023-02-10 13:58:41 +01:00
Jonas Platte
4a5a0293a9
ci: Replace unmaintained actions-rs/cargo action
...
… we really didn't need it and can use run instead.
2023-02-10 13:58:41 +01:00
Jonas Platte
3f16b324d7
ci: Use taiki-e/install-action to install cargo-tarpaulin
2023-02-10 13:58:41 +01:00
Jonas Platte
a5bfab1d55
ci: Replace unmaintained actions-rs/toolchain action
...
… with dtolnay/rust-toolchain.
2023-02-10 13:58:41 +01:00
Jonas Platte
e430f65ce8
ci: Exclude Debug implementations from coverage reports
...
We don't really want to check for exact representations, and otherwise
they are really just invoked in tests that fail.
2023-02-10 13:46:00 +01:00
Jonas Platte
441626bf68
ci: Exclude uniffi-bindgen from coverage checks
2023-02-10 13:02:31 +01:00
Jonas Platte
02e51a9cb9
ci: Test sqlite crypto store in coverage check
2023-02-10 13:02:31 +01:00
Jonas Platte
4492df6fc6
test(sdk): Add a test for retrying edit decryption
2023-02-10 12:41:05 +01:00
Jonas Platte
573b672470
fix(sdk): Fix handling of UTD "insivible" events
...
(ones which don't produce a timeline item on their own)
2023-02-10 12:41:05 +01:00
Jonas Platte
fe3c73602f
refactor(sdk): Always add UTD events to the timeline
...
… as currently this is the only way decryption can be retried.
2023-02-10 12:41:05 +01:00
Jonas Platte
fd2dc18746
refactor(sdk): Retry event decryption in timeline item order
...
This works better for relations.
2023-02-10 12:41:05 +01:00
Jonas Platte
55549f61be
test(sdk): Split timeline tests into smaller modules
2023-02-10 12:41:05 +01:00