Benjamin Kampmann
402d061d42
ci(crypto-nodejs): fixing path to npm package for publishing
2022-07-12 18:02:59 +02:00
Benjamin Kampmann
2a1bc372fc
chore(crypto-nodejs): setting version
2022-07-12 17:35:46 +02:00
Benjamin Kampmann
bcab2a6d8c
ci(crypto-nodejs): setting base branch
2022-07-12 17:24:34 +02:00
Benjamin Kampmann
703b3a3561
ci(crypto-nodejs): Fixing typo in workflow
2022-07-12 17:18:54 +02:00
Benjamin Kampmann
36f62ce67f
ci(crypto-nodejs): Use regular npm version to set version
2022-07-12 17:14:15 +02:00
Benjamin Kampmann
9bc605a76d
ci(crypto-nodejs): FIxing name and directory for action
2022-07-12 17:11:20 +02:00
Benjamin Kampmann
13a6825af7
ci(crypto-nodejs): Fix workflow syntax error
2022-07-12 17:07:49 +02:00
Benjamin Kampmann
c5796991e8
chore(crypto-nodejs): Adding changelog
2022-07-12 17:05:40 +02:00
Benjamin Kampmann
9a45325683
ci(crypto-nodejs): use org-wide secrets ( #835 )
2022-07-12 17:00:44 +02:00
Ivan Enderlin
0bde5ccf38
feat(bindings/crypto-nodejs): Add #[napi(strict)] to force type checking from JavaScript ( #829 )
...
* feat(bindings/crypto-nodejs): Add `#[napi(strict)]` to force type checking from JavaScript.
* chore(bindings/crypto-nodejs): Use our own fork of `napi-rs` for the moment.
2022-07-12 16:24:24 +02:00
Benjamin Kampmann
94b635c074
build(crypto-nodejs): Crypto Node.js release infrastructure ( #763 )
...
* feat(crypto-nodejs): Download lib binary in postinstall
* build(crypto-nodejs): Workflow to prebuild napi bindings
* ci(crypto-nodejs): Disable broken target, install without download
* ci(apple-ffi): Don't run for drafts
* ci(coverage): Don't run for draft PRs
* fix(crypto-nodejs): bind to current version for download
* fix(crypto-nodejs): Ignore libs and package
* ci(crypto-nodejs): Build and upload NPM package
* fix(crypto-nodejs): Set proper target list
* ci(crypto-nodejs): Remove FreeBSD from build pipeline
* ci(crypto-nodejs): Linkers for linux cross compile
* ci(crypto-nodejs): Add arm64 build for windows
* ci(crypto-nodejs): Proper linkers for arm and musl
* ci(crypto-nodejs): Correct apt command for musl
* fix(crypto-nodejs): Drop arm64 linux musl support
* ci(crypto-nodejs): Manual Workflow trigger process
* chore(crypto-nodejs): Get Github to pickup our action
* ci(crypto-nodejs): Add i686 Linux built
* ci(crypto-nodejs): Configure cliff for nodejs changelogs
* ci(crypto-nodejs): Proper gcc for i868 targets
* docs(crypto-nodejs): Add supported targets for npm install
* ci(crypto-nodejs): Limit building of binaries to tags
* style: consol.log -> console.info; Improve docs
Co-authored-by: Ivan Enderlin <ivan@mnt.io >
* activate for testing
* fix broken merge
* 0.1.0
* fix(js): put in the proper package name
* activate for PR for testing
* fix(nodejs): getting ready for publishing
* ci(crypto-nodejs): Adding docs and fixing naming for workflows
* typo: missed one
* fixing package name
Co-authored-by: Ivan Enderlin <ivan@mnt.io >
2022-07-12 16:05:57 +02:00
Benjamin Kampmann
15be2dc45e
Merge pull request #832 from johannescpk/sdk/identity-assertion-session
...
fix(sdk): Can't assert identity without session
2022-07-12 12:25:46 +02:00
Johannes Becker
420ca26bf5
fix(sdk): Can't assert identity without session
2022-07-12 10:44:56 +02:00
Kévin Commaille
2d0653894c
refactor(test): Rename LOGOUT to EMPTY
...
This name is more accurate for its uses.
2022-07-09 17:59:45 +02:00
Damir Jelić
47cfac7f4c
test: Optimize sha2 even in debug builds
...
This makes the tests finish on my machine twice as fast. This works
mainly because some tests utilize pbkdf2 to derive a key from a
passphrase.
2022-07-08 18:47:36 +02:00
Kévin Commaille
9539cbcfb9
test(appservice): Replace mockito with wiremock
2022-07-08 16:33:29 +02:00
Kévin Commaille
9778518347
test(sdk): Replace mockito with wiremock
2022-07-08 16:33:29 +02:00
Ivan Enderlin
dc2276cd8a
feat(bindings/crypto-nodejs): Implement an Attachment API.
...
feat(bindings/crypto-nodejs): Implement an `Attachment` API.
2022-07-08 16:26:19 +02:00
Damir Jelić
f1c880ff5f
feat(bindings/ffi): Add an authentication service
...
This adds a basic authentication service to the bindings that abstracts away the Client until a login has been completed successfully.
2022-07-08 12:24:15 +02:00
Damir Jelić
93e5728d65
test(sdk): Move the integration tests
...
This moves the bulk of the Client tests into integration tests.
2022-07-08 12:08:27 +02:00
Damir Jelić
a7af96d081
feat(crypto): Customized event types
...
This patch adds customized event types, currently only for the
m.room_key and m.secret.send to-device events.
This allows us to:
a) Deserialize the session_key field into a vodozemac type
b) Control when we zeroize secrets better
2022-07-07 19:20:42 +02:00
Doug
0dee880cd0
Address PR comments.
2022-07-07 17:15:12 +01:00
Ivan Enderlin
f0190b4601
feat(bindings/crypto-nodejs): Transform timeout into milliseconds
...
feat(bindings/crypto-nodejs): Transform `timeout` into milliseconds
2022-07-07 14:54:18 +02:00
Ivan Enderlin
6d83f01e73
fix(sdk): THe MediaEncryptionInfo.web_key has been renamed.
2022-07-07 13:59:36 +02:00
Ivan Enderlin
2eb5fc77f5
feat(bindings/crypto-nodejs): Remove Clone impl for MediaEncryptionInfo.
...
We don't want to clone a struct that contains a secret.
However, on the Node.js side, we can only receive arguments by
references. The problem we have is that we cannot transfer the
ownership of `MediaEncryptionInfo` to `AttachmentDecryptor` because we
don't own it. To simulate this behavior, we use `Option.take`.
A new method then appears:
`EncryptedAttachment.hasMediaEncryptionInfoBeenConsumed` to know if
the media encryption info has been consumed by `Attachment.decrypt`
already or not. That way, we can decrypt only once. It is possible to
do a JSON-encoded backup of the media encryption info by calling
`EncryptedAttachment.mediaEncryptionInfo` though.
2022-07-07 13:53:46 +02:00
Kévin Commaille
5ab8bd0885
Fix missing import
2022-07-07 13:24:54 +02:00
Kévin Commaille
ee69863912
Move event permalink test
2022-07-07 13:19:31 +02:00
Kévin Commaille
e87d599f84
Merge remote-tracking branch 'upstream/main' into integration-tests
2022-07-07 13:16:09 +02:00
Ivan Enderlin
0b011d9097
doc(bindings/crypto-nodejs): Add link to the specification.
2022-07-07 13:15:14 +02:00
Ivan Enderlin
0f5851cc01
chore(crypto): Rename MediaEncryptionInfo.web_key to .key.
2022-07-07 13:14:05 +02:00
Kévin Commaille
d6a2f15c68
Simplify use of via
...
Due to a ruma upgrade
2022-07-07 12:30:15 +02:00
Kévin Commaille
36a47c28ed
Add note that the event should be part of the room
2022-07-07 12:30:15 +02:00
Kévin Commaille
900016b249
feat(sdk): Get a permalink for an event
2022-07-07 12:30:15 +02:00
Kévin Commaille
de60a24602
Remove __test feature
2022-07-07 11:26:49 +02:00
Ivan Enderlin
29c10b8424
feat(bindings/crypto-nodejs): Convert timeout from u128 to u64.
...
First, u128 has a bug in `serde`,
cf. https://github.com/serde-rs/json/issues/625 .
Second, we don't need to represent the timeout as a u128, it's clearly
too large. This patch tries to convert it to u64. It should never
fail, but we propagate the error anyway.
2022-07-07 11:12:12 +02:00
Johannes Becker
4b856ce9d6
fix(sdk): Use the local config variable to decide identity assertion
2022-07-07 10:16:23 +02:00
Ivan Enderlin
c043daede0
test(crypto): Fix a test.
2022-07-07 10:15:24 +02:00
Ivan Enderlin
9f6988f766
Merge branch 'main' into fix-issue-796
2022-07-07 10:11:43 +02:00
Ivan Enderlin
ed0709373d
fix(crypto): Rename web_key to key for MediaEncryptionInfo.
...
Based on the [Section 11.11.1.6.1 Extensions to `m.room.message`
msgtypes](https://spec.matrix.org/v1.2/client-server-api/#extensions-to-mroommessage-msgtypes ),
the parameter for the JSON Web Key is named `key`, not `web_key`. This
patch fixes that by renaming the field when serializing and
deserializing.
2022-07-07 10:04:34 +02:00
Ivan Enderlin
acf9b15571
feat(bindings/crypto-nodejs): Use latest napi-rs version to avoid cloning Uint8Array.
...
The new `napi-rs` release includes a patch that avoids cloning and
copying data inside a `Uint8Array`
(https://github.com/napi-rs/napi-rs/pull/1224 ), it now returns a
“Node.js reference” of it.
This new `napi-rs` release also includes one of our patch,
https://github.com/napi-rs/napi-rs/pull/1200 , which means we no longer
need to depend on our fork.
2022-07-07 09:49:34 +02:00
Charles Wright
ba39185679
Fix build errors
2022-07-06 18:08:02 +02:00
Doug
da277c4978
Create a new client on login.
...
More clippy errors.
2022-07-06 12:43:02 +01:00
Doug
9925d73e7b
Fix typos and clippy errors.
2022-07-06 11:52:33 +01:00
Doug
fec879f0f3
Simplify AuthenticationError for now.
2022-07-06 10:29:13 +01:00
Doug
91427b82a5
Use an Optional client instead of failable init.
2022-07-05 18:14:25 +01:00
Ivan Enderlin
d7739369ae
chore(bindings/crypto-nodejs): Remove useless napi::Result.
2022-07-05 17:45:09 +02:00
Ivan Enderlin
4fd24eebea
feat(bindings/crypto-nodejs): Implement an Attachment API.
...
This patch provides a new API to encrypt and decrypt attachment,
i.e. big buffer of type `Uint8Array`.
It's based on `matrix_sdk_crypto::AttachmentEncryptor` and `AttachmentDecryptor`.
2022-07-05 17:31:52 +02:00
Benjamin Kampmann
73daec3757
Merge pull request #810 from gnunicorn/expose-invite-details
...
feat(sdk): Expose details of invite for invited room
2022-07-05 14:56:05 +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
Damir Jelić
771c33d710
chore(crypto): Bump vodozemac
...
Vodozemac used to accept and return strings when encrypting and
decrypting. This is quite unusual for a pure cryptographic library so we
switched towards the usual setup where we encrypt/decrypt raw bytes.
Since we do encrypt/decrypt JSON strings in Matrix land, we do the
string conversions over here.
2022-07-05 13:23:50 +02:00
Doug
56adf6a89b
Add a client_container with locks.
2022-07-05 11:43:10 +01:00
Ivan Enderlin
e5a7a975a3
feat(bindings/crypto-nodejs): Transform timeout into milliseconds.
2022-07-05 12:05:53 +02:00
Ivan Enderlin
f3e69a2352
fix(bindings/cryto-nodejs): Fix memory corruption in async functions
...
fix(bindings/cryto-nodejs): Fix memory corruption in async functions
2022-07-05 10:25:16 +02:00
Ivan Enderlin
607d7ebc22
fix(bindings/cryto-nodejs): Fix memory corruption in async functions.
...
In async functions, the Node.js GC may or may not (that's a random
behavior) collect the arguments passed to the function as soon as it
returns. The function may not be executed yet, since it's async. Thus,
it leads to memory corruption: The function tries to read later on the
value inside an argument and… it crashes at best.
To avoid this bug, there is no other choice than cloning the values
before the function returns, in its “sync path” (so before any
transformation of an `.await` point into an “async block”).
The performance impact is not “massive”, I'm not sure it could be
noticeable easily since it is most of the time related to identifiers
(e.g. `UserId`), which are cheap to clone. I have to find the balance
here, and cloning offers the best trade off from my point of view.
2022-07-05 09:07:20 +02:00
Doug
0178b71437
Add basic AuthenticationService to the FFI.
2022-07-04 16:55:50 +01:00
Kévin Commaille
dd6a902240
test(sdk): Move integration tests
2022-07-04 16:22:20 +02:00
Kévin Commaille
4eb1337dc8
ci: Remove whitespaces in config file
2022-07-04 16:22:19 +02:00
Benjamin Kampmann
81f02f0d0b
Merge pull request #804 from gnunicorn/ben-hunting-the-nodjs-segfault
...
Hunting the nodejs segfault bug, long-term
2022-07-04 15:25:09 +02:00
Ivan Enderlin
76fe6d54ac
feat(bindings/crypto-*): Add fallback_keys field to KeysUploadRequest
...
feat(bindings/crypto-*): Add `fallback_keys` field to `KeysUploadRequest`
2022-07-04 15:02:38 +02:00
Ivan Enderlin
eb358889e9
Merge branch 'main' into fix-issue-800
2022-07-04 14:31:28 +02:00
Ivan Enderlin
c82631c414
feat(bindings/crypto-js): Implement OlmMachine.sign
...
feat(bindings/crypto-js): Implement `OlmMachine.sign`
2022-07-04 14:16:27 +02:00
Ivan Enderlin
fb4a940a26
chore: Make Clippy happy…
2022-07-04 13:50:28 +02:00
Ivan Enderlin
05561a8777
chore(crypto): Make Clippy happy.
2022-07-04 13:06:14 +02:00
Ivan Enderlin
909ada43d7
chore(base): Make Clippy happy.
...
So, Clippy suggests to change `(&member).into()` to `member.into()`
but it's the same, and `From<T>` is not implemented for this `T`, only
`From<&T>` is present. Thus, to deceive Clippy, I'm using
`std::borrow::Borrow` here. Not super happy with that though…
2022-07-04 12:00:42 +02:00
Ivan Enderlin
6176b3b658
feat(bindings/crypto-ffi): Add fallback_keys field to KeysUpload.
2022-07-04 11:49:45 +02:00
Ivan Enderlin
566227576e
feat(bindings/crypto-js): Add fallback_keys field to KeysUploadRequest.
2022-07-04 11:47:27 +02:00
Ivan Enderlin
d6c0ef1497
feat(bindings/crypto-nodejs): Add fallback_keys field to KeysUploadRequest.
2022-07-04 11:47:15 +02:00
Ivan Enderlin
f72a14890d
chore(crypto) Make Clippy happy.
2022-07-04 11:42:50 +02:00
Ivan Enderlin
62378b4abc
Merge branch 'main' into fix-issue-797
2022-07-04 11:24:33 +02:00
Ivan Enderlin
f96069f591
chore(store-encryption): Call DerefMut manually.
...
Clippy on nigtly is raising a warning, which is turned into an error
on the CI. It's the [`explicit_auto_deref`
lint](https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref ). I
suspect it's a false-positive but I'm not sure. Anyway, to workaround
this and unblock our CI, let's call `DerefMut::deref_mut` manually:
it's clearer anyway.
2022-07-04 11:00:23 +02:00
Ivan Enderlin
59615d4ae3
chore(bindings/crypto-nodejs): Clean up based on feedback.
2022-07-04 10:17:11 +02:00
Benjamin Kampmann
fd38c757e4
feat(sdk): Expose details of invite for invited room
2022-07-01 19:44:27 +02:00
Jonas Platte
861d899541
refactor(base): Remove an unnecessary allocation
2022-07-01 16:16:29 +02:00
Jonas Platte
fd08c9e7da
refactor(base): Remove check for own user in notification handling
...
This is now done in Ruma.
Reverts commit bc78095611 .
2022-07-01 16:16:29 +02:00
Jonas Platte
cffb565a5f
chore: Allow some usage of deprecated fields
...
… to allow CI to succeed. They should be removed soon.
2022-07-01 16:16:29 +02:00
Jonas Platte
f20d1c3d76
chore: Upgrade ruma
2022-07-01 16:16:29 +02:00
Jonas Platte
e4f6c0cc58
chore(sdk): Remove feature ruma/appservice-api-helper
...
No longer used as of https://github.com/matrix-org/matrix-rust-sdk/pull/710
2022-07-01 16:16:29 +02:00
Jonas Platte
d3ae99eb22
chore: Silence new clippy lint
2022-07-01 12:39:46 +02:00
Jonas Platte
bc47caa356
chore: Remove unnecessary map_err's
2022-07-01 11:55:28 +02:00
Ivan Enderlin
afa96f1bf4
test(bindings/crypto-nodejs): Add more signing test cases.
2022-06-30 16:58:39 +02:00
Ivan Enderlin
c99f42347c
chore(bindings/crypto-nodejs): Simplify code by removing matches!.
2022-06-30 16:52:08 +02:00
Ivan Enderlin
51cb35502d
doc(bindings/crypto-nodejs): Add missing documentation.
2022-06-30 16:50:33 +02:00
Ivan Enderlin
b59077e83d
chore(bindings/crypto-nodejs): Replacing into_iter by iter on &BTreeMap.
...
Calling `into_iter` on `&BTreeMap` will not consume it. It has the
same effect as calling `iter`. So let's do it.
2022-06-30 16:48:44 +02:00
Ivan Enderlin
3f197734d9
feat(bindings/crypto-nodejs) Implement OlmMachine.sign.
...
This patch first implements the new `Signatures`, `Signature` and `MaybeSignature` types.
Then, it moves some Vodozemac types into their own module, and
implements the new `Ed25519Signature` type.
Finally, it implements `OlmMachine.sign`.
2022-06-30 16:44:07 +02:00
Benjamin Kampmann
1961403512
ci(crypto-nodejs): Only build non-release version on failure, improve CI build time
2022-06-30 12:53:51 +02:00
Benjamin Kampmann
f1ebbfd245
ci(crypto-nodejs): Create non-release build of version and upload everything as artifacts upon failure
2022-06-30 12:24:21 +02:00
Ivan Enderlin
0458ed9be1
feat(bindings/crypto-js): Implement DeviceKeyId, DeviceKeyAlgorithm and DeviceKeyAlgorithmName.
2022-06-30 08:51:36 +02:00
Ivan Enderlin
12c7b76fea
feat(bindings/crypto-js): Implement `OlmMachine.crossSigningStatus.
2022-06-30 08:33:28 +02:00
Marcel
a8601e186a
fix(appservice): Don't process the same transaction twice
2022-06-29 16:17:25 +00:00
Stefan Ceriu
8a2d13feea
feat(bindings): Session verification through FFI
2022-06-29 13:59:52 +02:00
Benjamin Kampmann
e2ca56114e
Merge pull request #785 from zecakeh/room-permalink
...
feat(sdk): Add method to get a room permalink
2022-06-29 13:58:25 +02:00
Anderas
3c6d159a04
refactor: Use ClientBuilder pattern in SDK FFI
...
Co-authored-by: Jonas Platte <jplatte@matrix.org >
2022-06-29 13:13:31 +02:00
Benjamin Kampmann
464bc43290
Merge pull request #793 from Hywan/test-crypto-nodejs-timeout
...
test(crypto-nodejs): Increase timeout
2022-06-29 12:58:11 +02:00
Kévin Commaille
297861e186
Fix docs styling
2022-06-29 12:20:57 +02:00
Kévin Commaille
8313029e33
Split into methods for both Matrix URI formats
2022-06-29 12:02:26 +02:00
Ivan Enderlin
913bdd683e
feat(crypto-js): Change the package name
...
feat(crypto-js): Change the package name
2022-06-28 19:28:58 +02:00
Ivan Enderlin
041b9bc405
feat(crypto-js): Change the package name.
2022-06-28 17:05:21 +02:00
Ivan Enderlin
1526f76686
test(crypto-nodejs): Increase timeout.
...
For some unknown reasons, sometimes, randomly, one test (initializing
an `OlmMachine` with a local store with a passphrase) can take more
than 5s, only on Github Actions. Let's increase the test timeout value
so that the entire test suite doesn't fail.
2022-06-28 16:47:46 +02:00
Kévin Commaille
f0e0194ff2
feat(sdk): Add method to get a room permalink
...
Include routing for room IDs
2022-06-26 13:38:01 +02:00
Kévin Commaille
ebc7177438
feat(base): Add method to get Room alt aliases
2022-06-26 12:01:51 +02:00
Ivan Enderlin
091fab8a2a
chore(bindings): Move matrix-sdk-ffi and matrix-sdk-crypto-ffi into the bindings/ directory
...
chore(bindings): Move `matrix-sdk-ffi` and `matrix-sdk-crypto-ffi` into the `bindings/` directory
2022-06-23 15:54:32 +02:00
Ivan Enderlin
818d715395
chore: Implement feedback.
2022-06-23 15:53:19 +02:00
Ivan Enderlin
5a0089da52
doc(bindings): Mention bindings in the top README.md file.
2022-06-23 15:12:51 +02:00
Ivan Enderlin
68b6c19dd4
test: Ensure all crates members of the workspace are compiled & tested.
2022-06-23 14:10:31 +02:00
Ivan Enderlin
c29e2b9563
!fixup
2022-06-23 11:35:42 +02:00
Ivan Enderlin
ecc28efd53
chore(bindings): Move matrix-sdk-ffi and matrix-sdk-crypto-ffi into the bindings/ directory.
2022-06-23 11:31:59 +02:00
Jonas Platte
f3a61020e7
refactor(sdk): Rewrite sso login to be easier to read
2022-06-22 17:17:52 +02:00
Jonas Platte
a423e92246
chore: Consistently capitalize 'device ID'
2022-06-22 17:17:52 +02:00
Jonas Platte
b5d7f10c6b
feature: Introduce a login builder API
...
This improves the readability of login calls.
The old login API is kept, but deprecated.
2022-06-22 17:17:52 +02:00
Ivan Enderlin
931eabf55c
chore(bindings): Move crypto-nodejs and crypto-js into the bindings/ directory
...
chore(bindings): Move `crypto-nodejs` and `crypto-js` into the `bindings/` directory
2022-06-22 16:33:20 +02:00
Ivan Enderlin
8cd7fa9fb0
chore: Implement feedback.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
1604f24136
chore(test): Fix YAML.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
3da737b9e2
chore(test): Shorten job name for test-matrix-sdk-crypto-nodejs.
...
In the Github UI, we can only see:
🐧 [m]-crypto-nodejs, Node.js…
What interests us is the Node.js version number.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
2ffcc1a415
chore: Use [m] as an alias for matrix-sdk.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
829dab42c5
chore(test): Rename the test-matrix-sdk-crypto-js job.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
54acd314cc
chore(test): Move the wasm workflow inside the ci workflow.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
74953031ee
chore(test): Use os-name in step name for test-appservice.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
0436eb9349
chore(ci): Rephrase a little bit the Github Actions steps.
2022-06-22 16:03:37 +02:00
Ivan Enderlin
a23bb8f5a0
chore(docs): Rephrase a little bit the Github Actions steps.
2022-06-22 11:57:41 +02:00
Ivan Enderlin
8db58986fb
chore(bindings): Move crypto-nodejs and crypto-js into the bindings/ directory.
...
`matrix-sdk-crypto-nodejs` and `matrix-sdk-crypto-js` are no longer
default members of the Cargo virtual workspace. The Github Actions
workflows for the bindings now live in a `bindings_ci.yml` files
(ideally, it should be in a subdirectory,
`.github/workflows/bindings/ci.yml` but it doesn't work).
2022-06-22 11:54:49 +02:00
Ivan Enderlin
6ad323bc4e
test: Run tests faster with nextest
...
test: Run tests faster with `nextest`
2022-06-22 09:56:02 +02:00
Ivan Enderlin
b0d51fdfa5
test: There is no doctest for matrix-sdk-crypto-ffi.
2022-06-22 09:26:51 +02:00
Ivan Enderlin
3bfc68d476
test: Add missing cargo-nextest installation.
...
This patch also changes the step's name from Clippy to Test.
2022-06-22 09:26:51 +02:00
Ivan Enderlin
eb33333925
test: Run doctests manually.
...
`cargo-nextest` doesn't support doctests for now, so we must run them
“manually” by running a separate `cargo test --doc` command.
2022-06-22 09:26:51 +02:00
Ivan Enderlin
d9475c131a
test(xtask): Remove xtask -- ci test as it is unused.
2022-06-22 09:26:48 +02:00
Ivan Enderlin
399862d955
test: Run tests faster with nextest.
...
> [`cargo-nextest`](https://nexte.st/index.html ) is a next-generation
> test runner for Rust projects.
This patch installs and uses `nextest` to run our own tests.
Comparing `cargo test` and `cargo nextest` with hyperfine provides the
following results:
```sh
$ hyperfine 'cargo test --workspace' 'cargo nextest run --workspace && cargo test --doc'
Benchmark 1: cargo test --workspace
Time (mean ± σ): 51.785 s ± 2.066 s [User: 183.471 s, System: 10.563 s]
Range (min … max): 49.151 s … 56.641 s 10 runs
Benchmark 2: cargo nextest run --workspace && cargo test --doc
Time (mean ± σ): 44.556 s ± 0.894 s [User: 192.213 s, System: 11.441 s]
Range (min … max): 43.170 s … 45.762 s 10 runs
```
Benchmark 2 is 1.16 times faster than Benchmark 1.
2022-06-22 09:26:07 +02:00
Ivan Enderlin
2c1f5fed8d
feat(crypto-js): Migrate tests and polish the API
...
feat(crypto-js): Migrate tests and polish the API
2022-06-21 12:04:45 +02:00
Ivan Enderlin
8b2237fa7a
Merge branch 'main' into feat-crypto-js-next
2022-06-21 11:38:48 +02:00
Ivan Enderlin
e5ea2a770b
chore(crypto-js): Implement feedback from PR.
2022-06-21 11:25:58 +02:00
Jonas Platte
5f31e9d131
chore: Add missing json language specification to docs
2022-06-20 22:33:35 +02:00
Jonas Platte
6cb9c11b88
chore: Remove unnecessary pub visibility from OnceCell imports
2022-06-20 22:33:35 +02:00
Jonas Platte
a00c130fc3
feature: Allow passing already-Arc'ed stores to StoreConfig methods
2022-06-20 18:00:33 +02:00
Jonas Platte
4971802e75
chore: Replace usage of Store with Arc<dyn StateStore>
2022-06-17 17:35:33 +02:00
Jonas Platte
8690addfd5
chore: Add Clone impl for ClientBuilder
2022-06-17 14:59:22 +02:00
Jonas Platte
00a20f325b
chore: Add Clone impl for StoreConfig
...
… by storing the stores inside Arc's instead of Box'es.
2022-06-17 14:59:22 +02:00
Jonas Platte
a4e4bfe833
refactor(sdk)!: Change store builder methods from Box<dyn Trait> to impl Trait
...
To migrate, don't box the store before passing it to `builder.state_store` or
`builder.crypto_store` (remove `Box::new`).
2022-06-17 14:59:22 +02:00
Jonas Platte
02aa537f2a
chore: Keep uniffi version in sync across deps, CI
2022-06-17 13:37:07 +02:00
Anderas
c755e19fb3
Merge pull request #765 from matrix-org/andy/crypto_ffi
...
Build Crypto iOS framework
2022-06-16 11:25:39 +01:00
Jonas Platte
8250c24525
chore: Undo pinning of clap
2022-06-15 20:47:55 +02:00
Andy Uhnak
fe29fa57eb
Build Crypto iOS framework
2022-06-15 13:52:21 +01:00
Ivan Enderlin
c564b1a5e1
feat(crypto-nodejs): Add store_path and store_passphrase to the OlmMachine constructor
...
feat(crypto-nodejs): Add `store_path` and `store_passphrase` to the `OlmMachine` constructor
2022-06-15 07:28:29 +02:00
Benjamin Kampmann
9d691e238a
Merge pull request #759 from Hywan/fix-codecov-labs
...
chore(test): Remove `labs` from the projects + exclude `matrix-sdk-indexeddb` from code coverage report
2022-06-14 20:29:07 +02:00
Ivan Enderlin
520e2f30f7
doc(crypto-js): Add missing module documentation.
2022-06-14 16:54:22 +02:00
Ivan Enderlin
c56ab5928c
test(crypto-js): Add a workflow to test matrix-sdk-crypto-js.
2022-06-14 16:34:08 +02:00
Ivan Enderlin
f8cd2310be
feat(crypto-js): Implement OlmMachine.decryptRoomEvent & siblings.
2022-06-14 16:16:54 +02:00
Ivan Enderlin
073fb45580
feat(crypto-nodejs): Define Node.js versions policy.
...
We now support only “current”, “active” or “maintenance” versions
according to https://nodejs.org/en/about/releases/ , which are
compatible with NAPI v6.
2022-06-14 16:05:01 +02:00
Ivan Enderlin
3833d35348
chore(crypto-nodejs): Drop Node.js v12.17.
...
There is a segfault with `napi-rs` and Node.js in v12.17. It's an old
version, it may be fair to drop its support for now. Let's see if
people would need it in the future, we may work on `napi-rs` to fix
this bug in case it's really necessary.
2022-06-14 16:05:01 +02:00
Ivan Enderlin
83b730d1c8
chore(crypto-nodejs): Make the code compatible with Node.js < 18.
2022-06-14 16:05:01 +02:00
Ivan Enderlin
6477cc5072
feat(crypto-nodejs): Add store_path and store_passphrase to the OlmMachine constructor.
...
This patch adds the `store_path` and the `store_passphrase` arguments
to the `OlmMachine` constructor to use a `CryptoStore` instead of
having an in-memory Olm machine.
2022-06-14 16:05:01 +02:00
Ivan Enderlin
2117b36a75
chore(test): Exclude matrix-sdk-indexeddb from code coverage report.
2022-06-14 16:04:41 +02:00
Ivan Enderlin
5e8ed3bcbf
chore(test): Remove labs from the projects.
...
It's already part of the `ignore` section.
2022-06-14 16:04:41 +02:00
Jonas Platte
87639a4c4c
fix(appservice): Remove erroneous ? operator
2022-06-14 15:20:24 +02:00
Amanda Graven
de04aba5b3
fix(appservice): Remove erroneous ? operator
2022-06-14 15:02:55 +02:00
Amanda Graven
5243091bec
test(appservice): Virtual client membership
...
Test that virtual clients get assigned the correct membership to rooms
when processing received transactions.
2022-06-14 14:39:54 +02:00
Amanda Graven
1d746f1ef1
fix(appservice): Virtual client non-membership
...
Don't assume virtual client membership is join if none is stored, since
that leads to a client being told it's joined in rooms it has no
membership of. The main appservice client still assumes it's joined
every room it receives transaction events about.
2022-06-14 14:39:54 +02:00
Ivan Enderlin
56d74e25b8
test(crypto-js): Finish to migrate the test suites + code clean up.
2022-06-14 14:09:52 +02:00
Ivan Enderlin
a758d98f84
feat(crypto-nodejs): Update license.
2022-06-14 12:12:27 +02:00
Ivan Enderlin
5adae6fd41
feat(crypto-js): Migrate tests and polish the API.
2022-06-14 12:12:27 +02:00
Damir Jelić
38d771cca6
ci(coverage): Set the correct out format for CI coverage reports
2022-06-14 12:01:03 +02:00
Jonas Platte
dd4c329f57
chore: Prevent clap upgrades beyond 3.2
2022-06-14 11:02:19 +02:00
Jonas Platte
e3edf0139a
Enable rustdoc-map nightly feature via .cargo/config.toml
...
… instead of using -Z on the command line.
2022-06-13 14:30:10 +02:00
Jonas Platte
d07001a581
chore: Work around a cargo bug
2022-06-13 14:30:10 +02:00
Ivan Enderlin
62b8169ac2
chore(test): Ajust code coverage configurations (tarpaulin and codecov)
...
chore(test): Code Coverage must ignore some `matrix-sdk-crypto-(js|nodejs)`
2022-06-13 14:24:22 +02:00
Ivan Enderlin
d35063412f
chore(test): Ignore matrix-sdk-test-macros and matrix-sdk-ffi.
2022-06-13 12:52:37 +02:00
Damir Jelić
1a162e5dd5
test(crypto): Test the double verification cancellation
2022-06-13 12:30:52 +02:00
Damir Jelić
b8069af8ba
fix(crypto): Cancel the verification flow if we multiple verifications
...
The spec claims that we should cancel verifications if multiple
verifications are attempted at once[1]:
When the same device attempts to initiate multiple verification
attempts, the recipient should cancel all attempts with that device.
So let's start doing this.
[1]: https://spec.matrix.org/v1.2/client-server-api/#error-and-exception-handling
2022-06-13 12:30:52 +02:00
Damir Jelić
fa3e192c37
docs(crypto): Improve the signature verification docs some more
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-06-13 12:12:09 +02:00
Damir Jelić
efc53569ed
refactor(crypto): Rename our is_signed_by methods
2022-06-13 12:12:09 +02:00
Damir Jelić
5c12132569
refactor(crypto): Introduce a SignedJsonObject trait
...
This should mostly remove the wild west of signature verification. We
define a trait that tells us which objects can contain signatures and
thus can be passed on to signature verification methods.
It also should be slightly more efficient, since we removed a bunch of
duplicate canonicalization steps.
2022-06-13 12:12:09 +02:00
Amanda Graven
251a38285c
perf(appservice): Cache namespace regexes
2022-06-13 11:57:50 +02:00
Ivan Enderlin
b500fa1daa
chore(test): Configure Tarpaulin to collect data from matrix-sdk-common.
2022-06-13 11:27:22 +02:00
Ivan Enderlin
4430dae421
chore(test): Configure Tarpaulin to ignore more crates.
2022-06-13 11:25:54 +02:00
Ivan Enderlin
eead09984c
chore(test): Ask codecov.io to ignore the crates/matrix-sdk-crypto-ffi directory.
2022-06-13 11:25:38 +02:00
Ivan Enderlin
dcfcac0bd3
chore(test): Ask codecov.io to ignore labs and xtask directories.
2022-06-13 11:24:10 +02:00
Jonas Platte
dc32fc282d
Remove sync_token from BaseClient
...
… as it is also accessible as self.store.sync_token in BaseClient methods.
2022-06-13 11:10:12 +02:00
Jonas Platte
b6eed09564
Make session field in Store private
...
… for cleaner encapsulation.
2022-06-13 11:10:12 +02:00
Jonas Platte
29ba171953
Simplify ownership of server_versions
...
We couldn't originally take references to it when it was behind RwLock,
with OnceCell this is no longer a problem.
2022-06-13 11:10:12 +02:00
Jonas Platte
9e9152745c
Remove homeserver_url from HttpClient
2022-06-13 11:10:12 +02:00
Jonas Platte
12d1607cdc
Remove session from HttpClient
2022-06-13 11:10:12 +02:00
Jonas Platte
6c8b520f14
Remove unused Clone impls on private types
2022-06-13 11:10:12 +02:00
Jonas Platte
fedcdb1e63
chore: Add some more tracing events
2022-06-13 11:10:12 +02:00
Jonas Platte
1cfd69a880
chore: Improve doc comment formatting
2022-06-13 11:10:12 +02:00
Ivan Enderlin
dad035d170
chore(test): Configure tarpaulin to use its config file.
2022-06-13 10:46:29 +02:00
Ivan Enderlin
3c14acf163
chore(test): Exclude matrix-sdk-crypto-(js|nodejs) from code coverage reports.
2022-06-13 10:38:07 +02:00
Ivan Enderlin
253affeb0c
feat(crypto-nodejs) Implement missing APIs
...
feat(crypto-nodejs) Implement missing APIs
2022-06-09 21:38:41 +02:00
Ivan Enderlin
fe4ddfde89
chore(crypto-nodejs): Remove clone calls when possible.
2022-06-09 21:15:25 +02:00
Ivan Enderlin
8a332ca9e1
chore(crypto-nodejs): Implement feedbacks / polish.
2022-06-09 18:02:29 +02:00
Ivan Enderlin
506f57a22c
feat(crypto-nodejs): Enable traace filtering and change the env var to MATRIX_LOG.
2022-06-09 14:06:42 +02:00
Damir Jelić
8b05f9276f
fix(sdk): Remove a duplicate Session cell from the HttpClient
2022-06-09 13:37:42 +02:00
Damir Jelić
e8b2655d52
docs(crypto-ffi): Explain what a timeout of 0 means when fetching identities
2022-06-09 11:58:23 +02:00
Damir Jelić
537ef1409b
test(crypto): Test that we're now notifying when we receive a /keys/query
2022-06-09 11:58:23 +02:00
Damir Jelić
e2bf3d0d18
chore(crypto-js): Silence some doc warnings
2022-06-09 11:58:23 +02:00
Damir Jelić
d188ef3386
feat(crypto): Add a way wait for a keys/query to be done when fetching identities.
2022-06-09 11:58:23 +02:00
Damir Jelić
ba7ccb40cc
feat(crypto): Wait for a key query to be done if we're claming one-time keys
2022-06-09 11:58:23 +02:00
Ivan Enderlin
1b2c644277
test(crypto-nodejs): Set up CI to run the test suites.
2022-06-09 11:34:16 +02:00
Benjamin Kampmann
6a853d0173
Merge pull request #744 from matrix-org/jplatte/readme
...
chore: Fix `main` docs link in readme
2022-06-09 10:51:58 +02:00
Jonas Platte
7487b24fe3
chore: Fix main docs link in readme
2022-06-09 10:21:04 +02:00
Amanda Graven
5c4f2b3430
fix(appservice): Make membership keys consistent
...
Correct the inconsistency between the keys used for reading and writing
the membership of a virtual user in the appservice's namespace
2022-06-08 10:42:35 +02:00
Stefan Ceriu
901b670a22
Use the nightly toolchain together with the newly introduced target-applies-to-host on the sdk-ffi crate debug builds to avoid cache corruption issues. Switched back to debug mode as the internal tokio crashes went away
2022-06-08 08:55:28 +02:00
Jonas Platte
28d6e2821b
chore: Replace new usage of Box<UserId>
2022-06-07 21:12:43 +02:00
Jonas Platte
7f0b74a39d
fixup! style: Remove usage of assign! macro from doctests
2022-06-07 21:07:34 +02:00
Jonas Platte
7b6869310f
style: Make assign! formatting consistent
2022-06-07 21:07:34 +02:00
Jonas Platte
445b2e627d
style: Remove usage of assign! macro from examples
2022-06-07 21:07:34 +02:00
Jonas Platte
0e206506d9
style: Remove usage of assign! macro from doctests
2022-06-07 21:07:34 +02:00
Jonas Platte
0fb1d72100
style: Use anyhow::Ok in more places
2022-06-07 21:07:34 +02:00
Ivan Enderlin
6d8c54deb5
chore(crypto-nodejs): Add missing newline.
2022-06-07 17:03:02 +02:00
Ivan Enderlin
07620452df
chore(crypto-node): Make Clippy happy.
2022-06-07 16:50:26 +02:00
Jonas Platte
099db20555
Use target-applies-to-host to avoid unnecessary cache invalidation
2022-06-07 16:43:17 +02:00
Ivan Enderlin
75571c2c30
fix(crypto-js): Fix missing symbol.
2022-06-07 16:42:34 +02:00
Ivan Enderlin
8c95b1c4cf
chore(crypto-nodejs): Fix a typo.
2022-06-07 16:40:54 +02:00
Ivan Enderlin
530c268e61
doc(crypto-nodejs): Include the README.md in the generated documentation.
2022-06-07 16:35:22 +02:00
Ivan Enderlin
99dcf84340
chore(crypto-nodejs): Use napi::Result when possible.
2022-06-07 16:28:55 +02:00
Ivan Enderlin
2a76d17bd9
doc(crypto-nodejs): Generate JavaScript/TypeScript documentation.
2022-06-07 16:26:23 +02:00
Ivan Enderlin
15af364c97
Merge branch 'main' into feat-crypto-nodejs-next
2022-06-07 15:31:03 +02:00
Ivan Enderlin
ec7724f393
doc(crypto-nodejs): Improve the README.md.
2022-06-07 15:27:35 +02:00
Ivan Enderlin
1e7d509920
chore(crypto-nodejs): Clean up.
2022-06-07 14:45:20 +02:00
Ivan Enderlin
520758bf1e
test(crypto-nodejs): Finish the OlmMachine test suite.
2022-06-07 14:42:24 +02:00
Benjamin Kampmann
7f49618d35
Merge pull request #729 from gnunicorn/gnunicorn/issue609
...
Ensure all data state stores save is encrypted
2022-06-07 12:41:38 +02:00
Benjamin Kampmann
a308771a7a
fix(sled): Deserialize encrypted TimelineMetadata properly
2022-06-07 12:22:54 +02:00
Benjamin Kampmann
2c4379909c
fix(sled): Wrap [u8] encoding in an explicit type to prevent accidential misuse
2022-06-07 12:22:54 +02:00
Damir Jelić
d4f49ca334
chore: Fix some new clippy warnings
2022-06-07 11:41:29 +02:00
Damir Jelić
c97bb83af9
refactor(base): Remove a bunch of OlmMachine wrapper methods
...
The whole machine is nowadays exposed through the base Client, so no
need to re-expose individual methods that don't add more functionality.
2022-06-07 11:41:29 +02:00
Ivan Enderlin
12c53bb2bc
test(crypto-nodejs): Add more test cases.
2022-06-07 11:05:19 +02:00
Damir Jelić
7fd973c563
refactor(crypto-ffi): Make use of the BackupRecoveryKey type instead of a string
2022-06-07 10:47:19 +02:00
Benjamin Kampmann
f8dae723c3
style: Fix review remarks
2022-06-07 10:20:55 +02:00
Benjamin Kampmann
8ccf78c025
fix(indexeddb): Ensure all values are encrypted (namely filters and timeline metadata) if asked to
2022-06-07 10:20:40 +02:00
Benjamin Kampmann
47bb73cf89
fix(sled): Ensure timeline metadata is also saved encrypted
2022-06-07 10:20:27 +02:00
Benjamin Kampmann
f3d952839e
style: Clean up rustfmt and clippy
2022-06-07 10:19:43 +02:00
Benjamin Kampmann
85ea9279dc
fix(indexeddb): Use random db in plain test for consistency
2022-06-07 10:19:27 +02:00
Benjamin Kampmann
be159356cd
fix(sled): Encrypt custom key and value
2022-06-07 10:19:23 +02:00
Benjamin Kampmann
571b5e61cf
fix(sled): Encrypt media content
2022-06-07 10:19:20 +02:00
Benjamin Kampmann
77af11bcbc
fix(sled): Encrypt saved sync_token
2022-06-07 10:19:20 +02:00
Benjamin Kampmann
335251695a
fix(sled): Encrypt saved filters
2022-06-07 10:19:17 +02:00
Benjamin Kampmann
bf17012d6b
test(base): Add integration store test for saving filters
2022-06-07 10:19:13 +02:00
Benjamin Kampmann
328ebdba9c
fix(sled): Encrypt saved user_ids
2022-06-07 10:19:08 +02:00
Benjamin Kampmann
c359b011fa
refactor(sled): Rename for consistency event -> value
2022-06-07 10:19:04 +02:00
Ivan Enderlin
07fed7f4df
test(crypto-nodejs): Continue to test OlmMachine and add tracing support.
2022-06-06 16:27:32 +02:00
Ivan Enderlin
0ed74d8c31
test(crypto-nodejs): Test OlmMachine.receiveSyncChanges, .outgoingRequests and .markRequestAsSent.
2022-06-06 12:09:37 +02:00
Ivan Enderlin
35d7cab330
feat(crypto-nodejs): Rename requests request_id to id + add type.
2022-06-06 12:08:58 +02:00
Ivan Enderlin
407e27d176
feat(crypto-nodejs): Make changed and left optional in DeviceLists constructor.
2022-06-06 10:27:32 +02:00
Damir Jelić
0f758a643c
refactor(crypto): Make the boolean parameter for the backup verification clearer
2022-06-03 16:29:17 +02:00
Damir Jelić
fd2ae1ed8f
docs(crypto): Improve some backup verfication docs
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-06-03 16:29:17 +02:00
Damir Jelić
2b13c0832f
refactor(crypto): Introduce a struct for the backup info
2022-06-03 16:29:17 +02:00
Damir Jelić
b3fbd15270
feat(crypto): Improve the API to verify backups
...
This API change allows us to inspect why a backup is considered to be
trusted instead of just returning a boolean telling us if it's trusted
or not.
2022-06-03 16:29:17 +02:00
Amanda Graven
4e3e393596
refactor(appservice): Better virtual client sync
...
Store the membership state of clients in the appservice's namespace, and
construct sync events based on that information
2022-06-03 15:03:31 +02:00
Jonas Platte
7f81e7c61b
chore: Optimize quote even in debug mode
2022-06-03 14:48:48 +02:00
Ivan Enderlin
a75ae16b79
test(crypto-nodejs): Add more test suites.
2022-06-02 15:58:30 +02:00
Ivan Enderlin
9ebc61ad0f
test(crypto-nodejs): Adding more test suites.
2022-06-02 15:24:22 +02:00
Ivan Enderlin
0d66480cd6
fix(crypto-nodejs): OlmMachine.new effectively raises an error.
...
Returning an `napi::Error` doesn't raise it. We must return a
`Result<_, napi::Error>` to ensure `napi` will raise the error as
expected.
2022-06-02 15:23:25 +02:00
Ivan Enderlin
02802e9088
feat(crypto-nodejs): EncryptionSettings.rotation_period and .…_period_messages are now BigInt.
2022-06-02 13:59:00 +02:00
Ivan Enderlin
1a6adc6d41
chore(crypto-nodejs): Ignore package-lock.json for now.
2022-06-02 11:10:55 +02:00
Ivan Enderlin
6d10d6150c
test(crypto-nodejs): Add some test suites.
2022-06-02 11:09:57 +02:00
Damir Jelić
fb1a2f6d94
feat(appservice): Add support for appservice login
...
An appservice can log in by providing a valid appservice token and a user within the appservice’s namespace.
This allows the appservice to acquire a scoped access token for a single user. matrix-appservice-sdk can now take a persisted device id for virtual users. If e2ee is enabled, it will automatically perform an appservice login to create the an E2EE backed session for the virtual user.
2022-06-02 10:36:33 +02:00
Damir Jelić
bdee4e0547
refactor(crypto): Use a result type for invalid signatures
2022-06-02 09:31:37 +02:00
Denis Kasak
42d5eec8b7
docs(crypto): Improve Signature doc comment.
2022-06-02 09:31:37 +02:00
Damir Jelić
e50c1465ea
docs(crypto): Improve some signature verification related docs
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-06-02 09:31:37 +02:00
Damir Jelić
5827cc9a39
refactor(crypto): Use ? instead of nesting closures when searching for a key
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-06-02 09:31:36 +02:00
Damir Jelić
c95fd93666
fix(types): Allow Ed25519 signatures to be invalid
...
Since signatures can be uploaded by anyone, unlike one-time keys which
might only be uploaded by the given device for themselves, a Signatures
struct might fail to be deserialized because a signature was maliciously
attached to the object by someone else.
We don't want to fail to deserialize all the signatures just because
someone attached an invalid one. We still would like to have the
signature be deserialized into its proper type if possible so the Raw<T>
pattern was not used.
2022-06-02 09:31:36 +02:00
Damir Jelić
d96fcf7199
refactor(crypto): Return a Signatures struct in the sign method
2022-06-02 09:31:36 +02:00
Damir Jelić
e2348471db
fix(crypto): Make fetching of the first cross signing key more robust
2022-06-02 09:31:36 +02:00
Ivan Enderlin
8e120eb648
doc(crypto-nodejs): Write missing documentation.
2022-06-02 09:23:26 +02:00
Ivan Enderlin
c573985c64
chore(crypto-nodejs): Add a .gitignore for artifacts.
2022-06-02 09:19:17 +02:00
Ivan Enderlin
6a996c7657
doc(crypto-nodejs): Write missing documentation and clean up the code.
2022-06-02 09:18:26 +02:00
Ivan Enderlin
7bb96e0ece
chore(crypto-node): Use Either7 (new pending feature).
2022-06-01 22:38:52 +02:00
Ivan Enderlin
dc7f0389b1
chore(crypto-node): Document and add napi(getter) when necessary.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
5d4b3a0457
feat(crypto-nodejs): Implement OlmMachine.decrypt_room_event.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
888ffb0a56
chore(crypto-node): Use Either5 + Either3 instead of Either.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
475fffb64d
feat(crypto-nodejs): Implement OlmMachine.encrypt_room_event.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
a8b44f26ea
feat(crypto-nodejs): Implement OlmMachine.share_room_key.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
a7697fbd32
feat(crypto-nodejs): Implement OlmMachine.get_missing_sessions.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
02e63ab9c1
chore(crypto-js): Remove a useless import.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
8d909ccabe
feat(crypto-nodejs): Implement OlmMachine.mark_request_as_sent.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
2e22f6b6c0
feat(crypto-nodejs): Implement OlmMachine.outgoing_requests.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
7c85fdaf28
doc(crypto-js): Update documentation.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
1ecf90bb42
feat(crypto-nodejs): Implement OlmMachine.receive_sync_changes.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
e2ecba7d45
feat(crypto-nodejs): Implement OlmMachine.update_tracked_users.
2022-06-01 20:55:34 +02:00
Ivan Enderlin
8a0e0a7a4d
feat(crypto-nodejs): Start implementing OlmMachine API.
2022-06-01 20:55:34 +02:00
Charlotte 🦝 Delenk
c562d91533
feat(appservice): Use appservice logins for e2ee
...
This commit also adds a virtual user builder, which allows you to
control the device id, change the client builder, perform an appservice
login, and even restore a previously created session.
https://spec.matrix.org/v1.2/client-server-api/#appservice-login
2022-06-01 15:29:04 +01:00
Ivan Enderlin
3cf4150df2
feat: Rename OlmMachine.share_group_session to OlmMachine.share_room_key
...
feat: Rename `OlmMachine.share_group_session` to `OlmMachine.share_room_key`
2022-06-01 15:08:58 +02:00
Ivan Enderlin
b3d52ca68c
feat: Rename OlmMachine.share_group_session to OlmMachine.share_room_key.
...
As discussed with @poljar, the Matrix event we are creating is
`m.room.key`, so it's preferable to rename the function
`share_room_key`. Note: Olm calls the things an inbound group session,
that's where the name comes from, but it's not aligned with the
specification.
2022-06-01 14:32:11 +02:00
Ivan Enderlin
e673954b98
chore: Add missing new lines at the end of files
...
chore: Add missing new lines at the end of files
2022-05-31 10:31:08 +02:00
Ivan Enderlin
6d7573dced
chore: Add missing new lines at the end of files.
2022-05-31 10:06:35 +02:00
Ivan Enderlin
2d14452398
Merge pull request #675 from Hywan/feat-crypto-wasm
...
feat(crypto): Port to Wasm (in a JS host) and to NodeJS
2022-05-31 10:01:57 +02:00
Ivan Enderlin
7931c4a589
chore(crypto-js): Clean up code and make CI happy.
2022-05-31 08:44:36 +02:00
Ivan Enderlin
4db1ad350b
feat(crypto-nodejs): Derive Debug for UserId.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
0debbf24d7
chore(crypto-js): Remove an unknown Clippy lint for now.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
bb8217d10f
doc(crypto-nodejs) Disable missing docs for now.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
6ff5c8e918
chore(crypto-js): Thanks Clippy.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
7fa89f76aa
chore(crypto-js): Update vodozemac's version to match matrix-sdk-crypto's.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
0335fdd07f
doc(crypto): Add missing module documentation.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
3f8e3b61ff
test(xtask) Replace WasmFeatureSet::MatrixSdkCrypto by *Js.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
efe5ea6a9c
test(ci): Exclude matrix-sdk-crypto-(js|nodejs) from code coverage.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
6afeeea56c
test(ci): Do not compile matrix-sdk-crypto to Wasm, but -crypto-js instead.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
bef1dfbf79
chore(crypto-js): Fix typos.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
51488b40d0
doc(crypto-js) Add missing documentation.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
b6a637893e
chore(crypto-js): Fix cargo fmt.
2022-05-31 08:40:16 +02:00
Ivan Enderlin
2a4dce30b2
Merge branch 'main' into feat-crypto-wasm
2022-05-31 08:40:11 +02:00
Ivan Enderlin
3194ad1f9a
feat(crypto-js): Implement OlmMachine.get_verification.
2022-05-31 08:39:34 +02:00
Ivan Enderlin
ee648144a2
feat(crypto-nodejs): Split into a new crate: matrix-sdk-crypto-nodejs.
...
Why? Because `napi` and `wasm-bindgen` are too different. At this
step, the most notable bugs are the way `napi` is handling its proc
macros. There is too much conflicts when used with `#[cfg_attr]`. It
makes the code repetitive and harder to read and to understand (and
also to compile, we must be very careful). But on the short-term,
quickly, we will see more notable differences between `wasm-bindgen`
and `napi`, e.g. with array (in `wasm-bindgen`, we can downcast array
items into particular types, with `napi` it's going to be a very
different code).
Instead of fighting the proc macros bugs now, and having to split the
code later inside the same crate, we believe it's a good idea to split
the code now into 2 crates. At first we will see obvious code
duplications, but on the short-term, the code is likely to be more and
more different.
2022-05-31 08:39:34 +02:00
Ivan Enderlin
afef9103a3
feat(crypto-js): Continue to port the API to NodeJS.
2022-05-31 08:39:34 +02:00
Ivan Enderlin
4df5ee6087
chore(crypto-js): Improve the Makefile for NodeJS support.
2022-05-31 08:39:34 +02:00
Ivan Enderlin
1a731ec385
feat(crypto-js): Rename OlmMachine.encrypt to .encrypt_room_event.
2022-05-31 08:39:34 +02:00
Ivan Enderlin
84fe78bab3
Merge branch 'main' into feat-crypto-wasm
2022-05-31 08:39:29 +02:00
Ivan Enderlin
bce11b209e
feat(crypto-js): Implement OlmMachine.update_tracked_users.
2022-05-31 08:38:24 +02:00
Ivan Enderlin
6c472f873f
feat(crypto-js): Start adding support for NodeJS.
2022-05-31 08:38:24 +02:00
Ivan Enderlin
250b85dc79
feat(crypto): Extract js module to its own crate: matrix-sdk-crypto-js.
2022-05-31 08:38:13 +02:00
Ivan Enderlin
f3ab1ae276
chore(crypto): Fix a typo.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
6b2df7afdd
feat(crypto): Implement `OlmMachine.get_missing_sessions.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
cdb252be5e
chore(crypto): Move everything inside crates/matrix-sdk-crypto/.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
db30ef6ee4
test(crypto): Add tests for the Wasm API.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
da8699fe40
feat(crypto): DeviceLists.new expects Array<UserId>s now.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
16b5eebe23
feat(crypto): Implement a hacky downcast function.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
8161360852
feat(crypto): Add toString methods on identifier objects.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
f01cfe42b4
feat(crypto): Implement EncryptionSettings.new with default values.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
a024c9b268
docs(crypto): Add missing documentation.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
c20349f46f
feat(crypto): Implement OlmMachine.share_group_session.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
e9d37d7c4e
docs(crypto): Add missing docs.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
8b94aed27f
fix(crypto): Use txn_id for transaction_id.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
dc5b15e799
fix(crypto): OutgoingRequest::ToDeviceRequest was not correctly mapped.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
30e9189f7b
fix(crypto): Use JavaScript naming convention for OlmMachine.invalidate_group_session.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
b6a5d4962b
Merge branch 'main' into feat-crypto-wasm
2022-05-31 08:36:30 +02:00
Ivan Enderlin
ee713f928f
feat(crypto): Implement OlmMachine.encrypt and .invalidate_group_session.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
444ff9936b
feat(crypto): Implement RoomId.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
2451815226
feat(crypto): Implement *PublicKey.to_base64 and .length.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
86c6e601bd
chore(crypto): Refactor the code with TryFrom on a tuple.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
9f159ff5a4
feat(crypto): Implement OlmMachine.mark_request_as_sent.
...
To implement this method, a new `responses::OwnedResponse`
intermediate type was needed. In addition to that, the `http` crate is
now required when the `js` feature is enabled.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
056f34883f
feat(crypto): Implement OlmMachine.trackedUsers.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
2d15f758da
feat(crypto): Use JavaScript naming style for methods.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
acd5de3cf3
feat(crypto): Implement ServerName, and add UserId.serverName.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
f0bb35a96c
feat(crypto): Add changed and left to the constructor of DeviceLists.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
1d38e54739
feat(crypto): Return a JsError rather than a String.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
08665dcd1c
feat(crypto): Implement our own future_to_promise helper to simplify code.
...
`wasm_bindgen_future::future_to_promise` expects a `Future<Output =
Result<JsValue, JsValue>>`. We reimplement this function by expecting
a `Future<Output = Result<T, anyhow::Error>>` where `T:
Into<JsValue>`. That way, we apply the type conversions to `JsValue`
inside this helper rather than in the call site. Additionally, all
errors are managed automatically without having to deal with `JsError`
or `JsValue`. It makes the code simpler to read and easier to write
from my point of view.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
569adb7ceb
feat(crypto) Implement OlmMachine.identity_keys.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
fd4dff79d4
feat(crypto) Implement OlmMachine.user_id, .device_id and .display_name.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
fdb9fe21c6
feat(crypto) Remove existing unwrap code.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
7e5eec82c5
feat(crypto) Implement OlmMachine.outgoing_requests.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
901715bcf3
chore(crypto) Generate a smaller Wasm module.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
3aa46fa746
feat(crypto) Implement OlmMachine.receive_sync_changes & friends.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
3318789a8b
feat(crypto) Implement UserId, DeviceId and OlmMachine in Wasm for JS.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
0fe0910fea
feat(crypto) Reduce Wasm binary size by enabling LTO.
2022-05-31 08:35:09 +02:00
Damir Jelić
a11633381b
Merge branch 'poljar/borrow-signature-check-fix'
2022-05-30 12:54:35 +02:00
Benjamin Kampmann
2ff6497604
Merge pull request #715 from gnunicorn/gnunicorn/issue694
...
docs: configure docs.rs build to contain more features
2022-05-27 22:24:02 +02:00
Damir Jelić
7f87abf408
refactor(crypto): Simplify the signature checking method
2022-05-27 21:29:58 +02:00
Damir Jelić
dd49a8bd43
fix(crypto): Don't require mutable borrows when signature checking
2022-05-27 21:28:35 +02:00
Damir Jelić
f8c3a1d03b
Merge branch 'poljar/signatures-struct'
2022-05-27 20:58:45 +02:00
Damir Jelić
808c4c6f3c
chore(crypto): Remove some indentation levels in the types module
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-05-27 20:55:17 +02:00
Damir Jelić
a14549d5cc
fix(crypto): Don't unwrap when converting to canonical json
2022-05-27 20:55:17 +02:00
Damir Jelić
9b5b4ab2b2
refactor(crypto): Use the Signatures struct for the CrossSigningKey
2022-05-27 20:55:17 +02:00
Damir Jelić
5756057719
refactor(crypto): Use the new Signatures struct for the DeviceKeys
2022-05-27 20:55:17 +02:00
Damir Jelić
c5ef3e7c94
refactor(crypto): Turn the SignedKeySignatures into a struct
2022-05-27 20:55:17 +02:00
Damir Jelić
fa7c1b60f6
feat(sdk): Replace some Mutex usage with a OnceCell
...
This makes some simpler getter methods non-async.
2022-05-27 16:37:51 +02:00
Julian Sparber
39b1fff218
Merge remote-tracking branch 'origin/main' into user_once_cell_for_session
2022-05-27 15:53:22 +02:00
Benjamin Kampmann
c6df6b421c
docs: fix target and feature-list for docsrs
2022-05-27 13:04:07 +02:00
Benjamin Kampmann
f9b4fd2d12
docs: configure docs.rs build to contain more features
2022-05-27 10:44:16 +02:00
Damir Jelić
e5390e18de
refactor(crypto): Introduce a SignJson trait
...
This patch collects our json signing logic into a single place.
2022-05-27 10:39:12 +02:00
Brandon Lau
28cd0c19e9
fix(crypto-ffi): make crypto-ffi generate a static library for iOS clients
2022-05-27 10:38:21 +02:00
Damir Jelić
15ebc95cd0
chore(qrcode): Add more missing Eq implementations
2022-05-25 13:52:22 +02:00
Damir Jelić
39e12a86ca
chore(crypto): Bump vodozemac
2022-05-25 13:49:00 +02:00
依云
ec9ec2567f
feat: Add .resolve_room_alias() method to the Client
2022-05-24 08:43:02 +02:00
Damir Jelić
fa9c91fb0e
fix(crypto-ffi): Add support to encrypt custom events
2022-05-23 19:37:04 +02:00
Johannes Becker
24b71bf869
feat(appservice): Improve autojoin example
2022-05-23 14:14:05 +02:00
Benjamin Kampmann
dd83cdd74b
Merge pull request #704 from matrix-org/poljar/eq-store-encryption
...
feat(store-encryption): Derive Eq for some structs
2022-05-23 13:07:29 +02:00
Jonas Platte
453cae641b
fix(docs): Remove history gh-pages branch
...
This should drastically reduce the repository size.
2022-05-23 12:57:45 +02:00
Damir Jelić
f838b5fae8
fix(base): Fix a clippy warning about temporary variables
2022-05-23 11:35:23 +02:00
Damir Jelić
1f722f224f
feat(crypto): Add a bunch of Eq implementations
2022-05-23 11:35:07 +02:00
Damir Jelić
a992a4e831
feat(store-encryption): Derive Eq for some structs
2022-05-23 11:14:09 +02:00
Benjamin Kampmann
017359b081
Merge pull request #700 from gnunicorn/b-improve-coverage-reporting
...
Improve CI coverage reporting
2022-05-20 12:33:05 +02:00
Benjamin Kampmann
08718acd57
Merge pull request #698 from matrix-org/poljar/rename-encrypt-method
...
refactor(crypto): Make it clear that the encrypt method is for room events
2022-05-20 10:35:03 +02:00
Benjamin Kampmann
dd1f817701
ci(CodeCoverage): exclude ffi & wasm from default project
2022-05-20 10:26:31 +02:00
Benjamin Kampmann
81db9ef4ca
ci(CodeCoverage): Remove patch-level coverage reporting
2022-05-20 08:34:56 +02:00
Benjamin Kampmann
e927834108
ci(CodeCoverage): split code coverage reporting in mandatory and optional areas
2022-05-20 08:34:39 +02:00
Damir Jelić
f3045dbf99
fixup! refactor(crypto): Make it clear that the encrypt method is for room events
2022-05-20 08:32:50 +02:00
Jonas Platte
d6c6211c00
chore: Use matrix_sdk::Result alias more
2022-05-20 07:52:39 +02:00
Jonas Platte
85949081ce
chore: Consistently use anyhow for Result-returning doctests
...
Cuts down on syntactic noise.
2022-05-20 07:52:39 +02:00
Jonas Platte
cbcc5feef2
fix(sled): Fix unused import when experimental-timeline isn't enabled
2022-05-20 07:52:39 +02:00
Jonas Platte
1b569a8fd4
chore: Consistently use anyhow::Result for example main fn's
...
When an `Err` is propagated out of `main`, it will be printed using
`Debug`, which is much easier to read in anyhow::Error's case. See also
https://docs.rs/anyhow/latest/anyhow/struct.Error.html#display-representations
2022-05-20 07:52:39 +02:00
Damir Jelić
813f388812
refactor(crypto): Make it clear that the encrypt method is for room events
2022-05-20 07:47:47 +02:00
Damir Jelić
552de33dbc
Merge branch 'dkasak/docs-improvements'
2022-05-20 07:26:00 +02:00
Denis Kasak
c3f2003eb7
docs: Slightly reword CryptoStore doc for consistency.
2022-05-19 16:22:09 +02:00
Denis Kasak
3b70d7f9ba
docs: Improve wording of store module-level comment
...
Includes a fix to refer to the `e2e-encryption` feature instead of
`encryption` (which doesn't exist).
2022-05-19 16:22:09 +02:00
Denis Kasak
c00c9d7b81
docs: Reword feature table so the wording is more uniform
2022-05-19 16:22:09 +02:00
Denis Kasak
126e8f1bd9
docs: Unify references to "cryptostore" as "crypto store"
2022-05-19 16:22:09 +02:00
Denis Kasak
9e6e76e5ed
docs: Fix reference to ClientConfig in doc comment
2022-05-19 15:38:13 +02:00
Damir Jelić
d1410fcded
ci: Run cargo audit every day
2022-05-19 10:03:46 +02:00
Jonas Platte
b955e7aad9
Use anyhow::Ok instead of turbofish on Result
2022-05-18 22:04:44 +02:00
Jonas Platte
a364018c0e
chore: Use serde::de::DeserializeOwned convenience trait
2022-05-18 22:04:44 +02:00
Jonas Platte
0f910b6229
fix(base): Make max_power_level reflect the current maximum only
...
… instead of taking into account an older maximum as well.
2022-05-18 14:03:12 +02:00
Benjamin Kampmann
736f0e7687
feat: Initial apple platforms support
...
Merge pull request #571 from matrix-org/jplatte/matrix-sdk-ffi
2022-05-18 13:14:29 +02:00
Stefan Ceriu
6a1b85c560
Fix xcframework debug build script
2022-05-18 13:43:29 +03:00
Benjamin Kampmann
e3503fe102
ci: one more move
2022-05-18 11:56:38 +02:00
Benjamin Kampmann
4522b4e8f5
ci: move rust cache to include uniffi bindgen install
2022-05-18 11:32:03 +02:00
Benjamin Kampmann
886809b579
chore(Apple): Move apple into subfolder
2022-05-18 11:24:30 +02:00
Benjamin Kampmann
97b91a47f1
ci: Setup CI test runs FFI crate (Apple platforms support)
...
Merge pull request #679 from matrix-org/stefan/matrix-sdk-ffi
2022-05-18 10:52:39 +02:00
Stefan Ceriu
4b8b9db075
Have FII action only run on PRs targetting main, similar to the CI one.
2022-05-18 11:49:29 +03:00
Jonas Platte
bc207f1e5c
chore(sdk): Upgrade async-once-cell to 0.3.1
2022-05-18 10:31:52 +02:00
Stefan Ceriu
d863b4eb75
Bump uniffi to version 0.18.0
2022-05-18 11:13:15 +03:00
Stefan Ceriu
45cb162e5a
Fix sample project, cleanup tests and add github action
2022-05-18 11:08:51 +03:00
Stefan Ceriu
ba2cef62b0
Move apple scripts; tweak the debug one to allow for CI builds
2022-05-18 11:08:51 +03:00
Jonas Platte
2d7fb1b61c
fix(matrix-sdk): room::Common:messages() don't return decryption error
...
If decryption fails we want that the user still has access to
the events.
This was broken in a previous commit.
2022-05-17 18:09:09 +02:00
Julian Sparber
d6f9e5f6b6
Remove extra controll flow
2022-05-17 17:52:12 +02:00
Julian Sparber
9c07ff1166
matrix-sdk: room::Common:messages() don't return decryption error
...
If decryption fails we want that the user still has access to
the events.
This was broken in a previous commit.
2022-05-17 17:23:32 +02:00
Julian Sparber
5bd7d17234
fix(matrix-sdk): room::Common:event() don't return decryption error
2022-05-17 17:03:28 +02:00
Benjamin Kampmann
7d439b1697
Merge pull request #680 from gnunicorn/ben-fix-docs
...
Fixing docs
2022-05-17 15:45:39 +02:00
Benjamin Kampmann
39f1b9d464
docs: fix link
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-05-17 13:54:37 +02:00
Benjamin Kampmann
8a86369e68
Merge branch 'ben-fix-docs' into jplatte/matrix-sdk-ffi
2022-05-17 13:39:46 +02:00
Benjamin Kampmann
a19999b240
docs: fixing broken inner link
2022-05-17 13:38:07 +02:00
Benjamin Kampmann
a72a05edc3
Merge remote-tracking branch 'origin/main' into jplatte/matrix-sdk-ffi
2022-05-17 13:05:24 +02:00
Julian Sparber
d0cc3d9c2b
Don't split links to two lines
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-05-17 12:56:24 +02:00
Benjamin Kampmann
2862934b87
style: fix clippy lints for ffi
2022-05-17 12:51:47 +02:00
Julian Sparber
3f3f9d653b
Fix code style
2022-05-17 12:46:06 +02:00
Julian Sparber
83fc91f87e
Add a pretty label for Session link
2022-05-17 12:39:11 +02:00
Julian Sparber
1e77c39498
Fix store example
2022-05-17 12:37:51 +02:00
Julian Sparber
1de27bcc0c
Fix CI and address requested changes
2022-05-17 12:22:35 +02:00
Amanda Graven
248fff370a
test(base): Remove invalid sync event from json
...
The test json used for mocking a sync response contained an ill-formed
event with a room_id key present in the event. Since the deserialization
ignores the room_id key, this resulted in the client's membership state
evaluating to left going by the contents of the state events, despite
the room being in the "joined" section of the sync response. This is a
violation of the spec.
2022-05-17 11:31:36 +02:00
Julian Sparber
26dd2d0e62
Merge remote-tracking branch 'origin/main' into user_once_cell_for_session
2022-05-17 11:14:28 +02:00
Benjamin Kampmann
4bbfa4345f
Merge pull request #678 from Hywan/fix-crypto-doc
...
docs(crypto): Remove outdated documentation and use auto-link
2022-05-17 10:28:07 +02:00
Johannes Becker
5f92113627
chore: Use resolver2 for workspace
2022-05-17 10:24:28 +02:00
Ivan Enderlin
426a93f07c
docs(crypto): Remove outdated documentation and use auto-link.
2022-05-17 10:08:42 +02:00
Benjamin Kampmann
0949979a1b
Merge remote-tracking branch 'origin/main' into jplatte/matrix-sdk-ffi
2022-05-16 13:35:51 +02:00
Benjamin Kampmann
76144de881
Fix(SDK): add missing import for experimental-timeline feature
...
Merge pull request #671 from jsparber/fix_import
2022-05-13 10:33:03 +02:00
Stefan Ceriu
bd4763235a
chore(matrix-sdk-ffi) Use stable toolchain for targeting aarch64-apple-ios-sim
2022-05-12 16:49:49 +03:00
Julian Sparber
911b5415b9
ci: Use experimental-timeline feature
2022-05-12 13:59:18 +02:00
Julian Sparber
c3fc6ff58f
Fix missing import for experimental-timeline feature
2022-05-12 12:38:58 +02:00
Benjamin Kampmann
4c84f252d2
Merge pull request #667 from matrix-org/ben-releasing-base-0.5.1
...
Release matrix-sdk-base 0.5.1
2022-05-11 19:23:16 +02:00
Benjamin Kampmann
70c0626882
chore: tag base 0.5.1
2022-05-11 19:01:12 +02:00
Benjamin Kampmann
5570181bf8
fix(sdk): Fix regression with push rules being applied to the own user_id only instead of all but the own user_id
...
Merge pull request #664 from JCWasmx86/ignore_notification
2022-05-11 18:52:55 +02:00
Benjamin Kampmann
7088ff89b5
Merge pull request #665 from matrix-org/ben-releasing-0.5.0
...
Releasing 0.5.0
2022-05-11 18:50:34 +02:00
Benjamin Kampmann
2561ed1df9
docs: Adding release notes for 0.5.0
2022-05-11 18:16:44 +02:00
JCWasmx86
3f36528a98
fix(sdk): Fix regression
2022-05-11 18:15:33 +02:00
Benjamin Kampmann
34da27222f
chore: Preparing all the small things for release
...
Merge pull request #657 from gnunicorn/ben-preping-for-release
2022-05-11 18:10:11 +02:00
Benjamin Kampmann
aa69bda05b
feat(matrix-sdk): Expose method to decrypt room events
...
Merge pull request #614 from jsparber/fix_decrypt_timeline
2022-05-11 17:34:19 +02:00
Benjamin Kampmann
8bdd0ffc5d
docs: Update crates/matrix-sdk-crypto-ffi/README.md
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-05-11 17:32:22 +02:00
Benjamin Kampmann
c21408934c
chore: Mark crypto-ffi as non-publish
2022-05-11 17:31:19 +02:00
Benjamin Kampmann
daa0768a04
Apply suggestions from code review
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-05-11 17:30:12 +02:00
Benjamin Kampmann
706ea248eb
Merge pull request #660 from gnunicorn/ben-encrypt-indexeddb-cryptostore-keys
...
fix(indexeddb): encrypt crypto-store key
2022-05-11 17:26:41 +02:00
Benjamin Kampmann
d120d9b70f
style(indexeddb): fix import order
2022-05-11 17:09:29 +02:00
Benjamin Kampmann
ef2754736a
docs(sled): Document doubts on sled in the readme
2022-05-11 17:07:07 +02:00
Jonas Platte
bc78095611
fix(sdk): Don't send notifications for your own user
2022-05-11 17:02:30 +02:00
Benjamin Kampmann
45ea472c83
Merge remote-tracking branch 'origin/main' into ben-preping-for-release
2022-05-11 16:57:40 +02:00
Benjamin Kampmann
583810726d
style(indexeddb): Minor style fixes for fmt and clippy
2022-05-11 16:56:18 +02:00
JCWasmx86
5fef975ef2
fix(sdk): Don't send notifications for your own user
2022-05-11 16:52:24 +02:00
Benjamin Kampmann
86d2a74c25
Chore: adding issue tracker link to fixme
2022-05-11 15:32:09 +02:00
Benjamin Kampmann
aa5e28e58f
style(indexeddb): &self.store_cipher instead of Some(ref cipher)
2022-05-11 15:27:28 +02:00
Benjamin Kampmann
0080a74d3b
fix(indexeddb): temporarily disable tests
2022-05-11 15:24:56 +02:00
Benjamin Kampmann
44c5244b9a
style: fixing cargo format
2022-05-11 13:09:07 +02:00
Benjamin Kampmann
339d701477
fix(indexeddb): Encrypt key with store-cipher
2022-05-11 13:04:15 +02:00
Benjamin Kampmann
74a01376c7
test(sled): Add tests for encrypted crypto-store
2022-05-11 12:42:45 +02:00
Julian Sparber
379e3f27af
Merge remote-tracking branch 'origin/main' into fix_decrypt_timeline
2022-05-11 12:28:43 +02:00
Julian Sparber
89e0af97af
Drop trait used in room::Common::decrypt_event
2022-05-11 12:28:20 +02:00
Damir Jelić
fbb369da8d
refactor(crypto): Remove the dead pickle key
2022-05-11 12:02:35 +02:00
Jonas Platte
1fdd1ab23a
Cleanup after rebase
2022-05-11 11:57:27 +02:00
Jonas Platte
40dcc988d6
fixup! feat: Initial apple platforms support
2022-05-11 11:07:50 +02:00
Jonas Platte
9909cb597a
squash! feat: Initial apple platforms support
...
Enable sending of messages
2022-05-11 11:07:50 +02:00
Jonas Platte
56cfe8f231
squash! feat: Initial apple platforms support
...
Some FFI API cleanup
2022-05-11 11:07:50 +02:00
Jonas Platte
ab9d8eb52b
feat: Initial apple platforms support
...
Co-authored-by: Stefan Ceriu <stefan.ceriu@gmail.com >
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com >
2022-05-11 11:07:42 +02:00
Julian Sparber
af01c64712
Fix doc ofr room::Common::decrypt_event()
2022-05-11 11:01:54 +02:00
Julian Sparber
c8233b6c85
Drop CryptoHolder and use OnceCell for OlmMachine
...
THe CryptoHolder is just used to hold the crypto-store till the
matrix_sdk::Session is set and it is possible to create the OlmMachine.
But with this approch we need to use a Mutex and getting the OlmMachine
becomes more expensive because of this. Therefore this replaces the
Mutex with a OnceCell. The only downside is that the BaseClient needs to
hold onto a referance to the crypto-store. (It would be possible to drop
it after the OlmMachine is created, but I don't think gives use any
improvment)
2022-05-11 10:48:12 +02:00
Julian Sparber
b72bdcd7d4
Use OnceCell to store matrix_sdk::Session
...
Since the session can be set only once there is no point in using a
Mutex or RwLock.
2022-05-10 17:10:34 +02:00
Benjamin Kampmann
ab87013125
chore: make wasm-example non-publish
2022-05-10 15:10:01 +02:00
Benjamin Kampmann
e146daf2a3
chore: bump main crate
2022-05-10 15:09:41 +02:00
Julian Sparber
5501378a77
Merge remote-tracking branch 'origin/main' into fix_decrypt_timeline
2022-05-10 14:55:29 +02:00
Julian Sparber
b586f1690b
use trait as argument for room::Common::decrypt_event
2022-05-10 14:54:13 +02:00
Benjamin Kampmann
1c967669d9
chore: Bumping crate versions
2022-05-10 13:41:00 +02:00
Benjamin Kampmann
89a8245ce6
fix(test-macros): Add missing feature from syn
2022-05-10 13:09:27 +02:00
Benjamin Kampmann
d2f251b2d5
chore: version and path fixes for releasing
2022-05-09 20:11:10 +02:00
Benjamin Kampmann
c72b769389
Merge remote-tracking branch 'origin/main' into ben-preping-for-release
2022-05-09 20:09:26 +02:00
Benjamin Kampmann
41799a08ed
Merge pull request #655 from matrix-org/ben-name-alignment
...
Align crate names
2022-05-09 20:04:02 +02:00
Benjamin Kampmann
4b2bac965d
docs: Adding Readmes
2022-05-09 17:58:31 +02:00
Benjamin Kampmann
c61215630b
chore: Fixing missing Cargo.toml Metadata"
2022-05-09 17:43:41 +02:00
Benjamin Kampmann
23a13a77a4
Merge remote-tracking branch 'origin/main' into ben-name-alignment
2022-05-09 17:04:17 +02:00
Benjamin Kampmann
cea57724e7
missed one
2022-05-09 16:39:50 +02:00
Jonas Platte
1f714e9cc5
feat(sdk): Allow OriginalSyncRoomRedactionEvent as first event handler param
2022-05-09 16:38:58 +02:00
Jonas Platte
02587bf6bf
fix(sdk): Fix wrong event handler ID for redacted redaction event
2022-05-09 16:38:58 +02:00
Jonas Platte
320a20b787
chore: Add store error backend variant constructors
2022-05-09 16:38:58 +02:00
Jonas Platte
844b22fd8e
chore: Remove From<Box<dyn Error + …>> impls for store errors
2022-05-09 16:38:58 +02:00
Benjamin Kampmann
26c82b3010
fix: fixing missed cases and style
2022-05-09 16:22:37 +02:00
Benjamin Kampmann
1de4a6cdd6
refactor: Rename matrix-crypto-ffi to matrix-sdk-crypto-ffi
2022-05-09 16:12:11 +02:00
Benjamin Kampmann
08f180cdb7
refactor: Rename matrix-qrcode to matrix-sdk-qrcode
2022-05-09 16:12:11 +02:00
Denis Kasak
8c3843f392
Merge pull request #654 from matrix-org/dkasak/switch-to-vodozemac-release
...
chore: Switch to released vodozemac
2022-05-09 12:46:15 +00:00
Denis Kasak
b396232756
refactor: clippy fixes
2022-05-09 14:34:31 +02:00
Denis Kasak
9e3089074f
chore: Switch to released vodozemac.
2022-05-09 14:06:05 +02:00
Julian Sparber
fa37a2dea2
Fix missing referance
2022-05-09 13:58:04 +02:00
Julian Sparber
3910122fd5
Remove uneeded ref
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-05-09 13:51:03 +02:00
Julian Sparber
2919c2d5d1
matrix-sdk: Expose method to decrypt room events
...
The also adds an enum so that the user can give many different rust
types to the decryption method.
2022-05-09 13:12:40 +02:00
Jonas Platte
0fad7b60a9
feat(base): Properly handle redacted m.room.member events
2022-05-09 12:38:22 +02:00
Jonas Platte
a2fb420635
chore(base): Use PowerLevels::for_user helper
2022-05-09 12:38:22 +02:00
Jonas Platte
6088993706
chore(base): Move MinimalStateEvent higher up the module hierarchy
2022-05-09 12:38:22 +02:00
Jonas Platte
41bcc9bdd7
chore(base): Remove unnecessary bounds on MinimalStateEvent
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
Jonas Platte
58bcd354f6
chore(sdk): Reduce unnecessary clones
2022-05-09 12:38:22 +02:00
Ivan Enderlin
5c6a6464c4
chore(crypto) Fix a typo in the code.
2022-05-09 11:50:40 +02:00
Ivan Enderlin
d3c20b2a13
feat(crypto) Generate a cdylib for the crate.
...
Ask `rustc` to generate a dynamic system library, which will be useful
to generate a Wasm module.
2022-05-09 10:51:18 +02:00
Ivan Enderlin
7817af9aa6
feat(crypto) Add the js feature.
...
This patch updates to code to raise a compilation error if the `js`
feature is used for another architecture than `wasm32`.
2022-05-09 10:40:32 +02:00
Ivan Enderlin
7569c08ada
feat(crypto) Add wasm-bindgen as a dep and simplify Cargo.toml.
2022-05-09 10:40:13 +02:00
Charlotte
be2a818c84
feat(base)!: Use boxed errors in StoreError and CryptoStoreError
2022-05-06 17:05:27 +02:00
Benjamin Kampmann
8b805f9f01
Merge pull request #649 from zecakeh/display-name
...
DisplayName fixes
2022-05-06 14:46:49 +02:00
Benjamin Kampmann
86b9dc5e57
style(appservice): Remove allocation and make clippy happy
2022-05-06 14:08:27 +02:00
Jonas Platte
260f888a89
chore(appservice): Fix another clippy warning
2022-05-06 14:08:01 +02:00
Jonas Platte
5907fac248
chore(base): Rewrite BaseRoomInfo::handle_redaction
2022-05-06 14:08:01 +02:00
Jonas Platte
3c8da5f7e1
feat(base): Handle redactions in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
8043b6c1e1
chore(base): Store topic event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
4e16f79ad2
chore(base): Store tombstone event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
f93baf7ed4
chore(base): Store name event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
9e058b6202
chore(base): Store join_rules event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
a5e81ebcc9
chore(base): Store history_visibility event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
aa7fc8ff47
chore(base): Store guest_access event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
849fbe94f1
chore(base): Store create event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
c9527e7263
chore(base): Store canonical_alias event's ID in BaseRoomInfo
2022-05-06 14:08:01 +02:00
Jonas Platte
9a3b81178f
chore(base): Store avatar event's ID in BaseRoomInfo
...
Required to make redactions work properly.
2022-05-06 14:08:01 +02:00
Jonas Platte
1e9e13ab63
chore(base): Use RoomInfo::room_version accessor
2022-05-06 14:08:01 +02:00
Kévin Commaille
2545e1bd72
fix(sdk): Re-export DisplayName
2022-05-06 11:35:48 +02:00
Kévin Commaille
1b8337cdc2
doc(sdk-base): Fix typo
2022-05-06 11:35:48 +02:00
Jonas Platte
b95aea9cf0
chore(crypto): Fix new clippy warning
2022-05-06 11:29:35 +02:00
Julian Sparber
12cdf8c159
chore(sdk): Use OnceCell to store server versions
2022-05-06 11:08:10 +02:00
Benjamin Kampmann
2054f5deef
docs(crypto-ffi) Fix a typo in the README.md
...
Merge pull request #645 from Hywan/doc-readme-typo
2022-05-06 08:23:28 +02:00
Benjamin Kampmann
0a6983512a
Merge pull request #646 from Hywan/doc-sdk-base-readme-typo
...
docs(sdk-base) Fix a typo in the `README.md`
2022-05-06 08:07:34 +02:00
Ivan Enderlin
977438207c
docs(sdk-base) Fix a typo in the README.md.
2022-05-05 13:42:34 +02:00
Ivan Enderlin
87b849a95b
docs(crypto-ffi) Fix a typo in the README.md.
2022-05-05 13:36:39 +02:00
Damir Jelić
3a4656cedd
Merge branch 'poljar/cleanup-verification-constructors'
2022-05-05 13:16:34 +02:00
Benjamin Kampmann
7e399e1e8d
Merge pull request #644 from matrix-org/poljar/fix-sled-cryptostore-only-compilation
...
fix(sled): Fix the compilation if only the cryptostore is enabled
2022-05-05 12:43:38 +02:00
Benjamin Kampmann
b9e92886de
refactor!: Put timeline behind experimental-timeline-feature-flag
2022-05-05 12:31:02 +02:00
Damir Jelić
2c415abce8
fix(sled): Fix the compilation if only the cryptostore is enabled
2022-05-05 12:22:16 +02:00
Benjamin Kampmann
3de2a9ad22
feat(sled): Add state store db schema version support
...
Merge pull request #640 from matrix-org/gnunicorn/issue585
2022-05-05 12:13:30 +02:00
Benjamin Kampmann
0f95687bec
fix(base): Don't create empty changeset for each run
2022-05-05 12:11:33 +02:00
Damir Jelić
2a5f17005d
refactor(crypto): Make the transaction id non-optional in the Sas constructor
2022-05-05 11:55:00 +02:00
Benjamin Kampmann
5fce18f4dd
chore: remove unneccessary feature-flag
2022-05-05 11:21:34 +02:00
Benjamin Kampmann
93b42236fe
chore: Merge remote-tracking branch 'origin/main' into b-featureflag-timeline
2022-05-05 10:33:56 +02:00
Benjamin Kampmann
26935ee1c0
Fix(room)!: Calculate display_name correctly for invited rooms
...
- [x] Make the `DisplayName` an actual type to allow API users to localize the generic name
- [x] tests for various naming use cases
- [x] fix the cases where we currently calculate a faulty name, fixes #133
- [x] strong-typed EitherMemberEvent from storage
- [x] add tests for eithermember in store integration tests
- [x] update sled store for new trait signature
- [x] update indexeddb store for new signature
- [x] rename `DisplayName::Computed` to `DisplayName::Calculated`
- [x] fix renaming failing test(s)
2022-05-04 20:04:07 +02:00
Benjamin Kampmann
ab08ce6ff1
style(sled): cargo fmt
2022-05-04 16:54:03 +02:00
Benjamin Kampmann
ae3cd70904
feat(sled): Add store db schema version support
2022-05-04 16:39:08 +02:00
Benjamin Kampmann
7b21166784
chore: Merge remote-tracking branch 'origin/main' into b-featureflag-timeline
2022-05-04 16:17:06 +02:00
Benjamin Kampmann
403ce9b711
chore: Merge remote-tracking branch 'origin/main' into gnunicorn/issue133
2022-05-04 16:10:22 +02:00
Benjamin Kampmann
98fa629f38
fix(memstore): Separate stripped and regular user indixes
2022-05-04 16:09:54 +02:00
Benjamin Kampmann
75f0fe94e8
fix(indexeddb): Separate stripped and regular user_id indixes
2022-05-04 16:02:02 +02:00
Benjamin Kampmann
c0c4c603aa
refactor!: Cleaning up feature gates
...
Merge pull request #591 from matrix-org/ben-feature-fixup
- [x] switches to latest rust 1.60 as MSRV
- [x] renames `encryption`-feature to `e2e-encryption` for clarity
- [x] combines the `*-state-store`/`*-crypto-store` features into a single feature `sled` and `indexeddb` respectivly
- [x] and combines them with weak `e2e-encryption`-dependencies to activate the features as necessary
- [x] moves the code back to the sled-store, where it belongs
- [x] updates the docs accordingly
BREAKING CHANGE
2022-05-04 15:26:20 +02:00
Benjamin Kampmann
0abdebfe8b
docs: typo in feature name
...
Co-authored-by: Damir Jelić <poljar@termina.org.uk >
2022-05-04 15:15:06 +02:00
Benjamin Kampmann
8e2e4e6058
style(xtask): Fixing formatting
2022-05-04 13:54:55 +02:00
Benjamin Kampmann
aaee28b34f
style: Improved wording
...
As suggested in the review.
Co-authored-by: Damir Jelić <poljar@termina.org.uk >
2022-05-04 13:48:11 +02:00
Benjamin Kampmann
335a7d03c3
fix: Put all MSRV to 1.60
2022-05-04 13:41:07 +02:00
Benjamin Kampmann
f61248cbbd
style: Put warnings aside by feature-gating properly
2022-05-04 13:38:08 +02:00
Damir Jelić
83d6e8ea82
refactor(crypto): Simplify the verification object constructors
...
This patch moves all the important identities that we need for
verification into the already existing IdentitiesBeingVerified struct.
It adds a method to get those identities to the store, and streamlines
our to-device and in-room verification constructors.
2022-05-04 13:36:26 +02:00
Benjamin Kampmann
fdcbd59557
fix(SDK): Put timeline behind a feature-flag
2022-05-04 12:55:01 +02:00
Benjamin Kampmann
3a06908755
fix(sled): Put timeline behind feature-flag
2022-05-04 12:42:34 +02:00
Benjamin Kampmann
5f6e0ae033
fix(base): Put further timeline features behind feature-flag
2022-05-04 12:36:53 +02:00
Benjamin Kampmann
e1e919dd2c
fix(indexeddb): Put timeline feature behind feature-flag
2022-05-04 12:24:21 +02:00
Benjamin Kampmann
98d2b8a0fe
fix(base): Put timeline behind exprimental-timeline-feature-flag
2022-05-04 11:54:14 +02:00
Benjamin Kampmann
e60d2fde7e
fixing xtask wasm-pack cli command
2022-05-04 11:11:01 +02:00
Benjamin Kampmann
5d3351f5cc
chore(sledstore): Revert user-id removing code
2022-05-04 10:52:42 +02:00
Jonas Platte
b2273ab7a1
chore: Add semicolons after unit-typed expressions
2022-05-03 14:23:29 +02:00
Jonas Platte
17a26bfe68
chore: Use Entry::or_default() where applicable
2022-05-03 14:23:29 +02:00
Jonas Platte
d44f2657f4
chore(base): Fix inconsistent order of common function parameters
2022-05-03 14:23:29 +02:00
Jonas Platte
1c3890651d
chore(base): Simplify signature of handle_invited_state
2022-05-03 14:23:29 +02:00
Jonas Platte
92f3737be6
chore: Remove unneeded lint silencing
2022-05-03 14:23:29 +02:00
Benjamin Kampmann
3cc5e48aac
ci: Fix new no-crypto ci wasm command
2022-05-03 12:05:34 +02:00
Damir Jelić
c01cbdd3f2
fix(crypto-ffi): Allow room message requests to be marked as sent
2022-05-03 10:59:16 +02:00
ganfra
84d1af1332
[crypto-ffi] Add RoomMessage in RequestType
2022-05-03 10:49:17 +02:00
Benjamin Kampmann
e3016482e1
fix: Simplify UnknownError in SDK
2022-05-03 10:28:28 +02:00
Benjamin Kampmann
a58a58f30d
Merge remote-tracking branch 'origin/main' into ben-feature-fixup
2022-05-03 10:21:11 +02:00
Benjamin Kampmann
7dd7f5a611
Merge pull request #626 from matrix-org/gnunicorn/issue565
...
Fixing benchmarking,
fixes #565
2022-05-03 10:20:15 +02:00
Benjamin Kampmann
aad0cbe496
ci(benchmarking): disable benchmark runs other than manually requested
2022-05-03 09:39:35 +02:00
Benjamin Kampmann
68d5097d96
fix(sled): Unmix stripped and regular user_ids
2022-05-03 09:03:13 +02:00
Benjamin Kampmann
06085a0c74
Merge remote-tracking branch 'origin/main' into gnunicorn/issue133
2022-05-03 08:45:24 +02:00
Benjamin Kampmann
f416ebfdd8
fix(sled-store): Fix faulty mixing of stripped and regular user_ids
2022-05-03 08:44:52 +02:00
Benjamin Kampmann
4de29b8178
test(state tests): Put stripped_member test into its own DB to ensure separation
2022-05-03 08:22:57 +02:00
Benjamin Kampmann
12894aff99
ci(benchmark): Fixing output format
2022-05-02 17:01:56 +02:00
Benjamin Kampmann
f20390036b
fix(indexeddb): Ensure internal account info is up to date on regular save_changes
2022-05-02 16:58:21 +02:00
Benjamin Kampmann
9763c13a34
ci(benchmarks): Switch to Mr. B access token
2022-05-02 16:36:44 +02:00
Benjamin Kampmann
54c93e4982
ci(benchmarks): more specific cargo-bench params
2022-05-02 16:30:30 +02:00
Benjamin Kampmann
b6d71cbeba
fix(benchmarks): keep the temprorary dir until end of tests
2022-05-02 16:29:50 +02:00
Benjamin Kampmann
a4ec6cb6d6
fix(sled-crypto): Ensure cryptostore.save_changes for account updates internal account_info
2022-05-02 16:29:02 +02:00
Benjamin Kampmann
1ea377bdbf
chore: Merge pull request #625 from matrix-org/ben-ci-fixup
...
xtask fixup
2022-05-02 15:45:29 +02:00
Benjamin Kampmann
827f8c3e17
ci(benchmarking): Add github token to benchmarking
2022-05-02 14:17:13 +02:00
Benjamin Kampmann
32cd372f49
Merge remote-tracking branch 'origin/main' into ben-feature-fixup
2022-05-02 13:30:42 +02:00
Benjamin Kampmann
b592fc5cac
Update xtask/src/fixup.rs
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-05-02 12:44:31 +02:00
Benjamin Kampmann
d077aa6a90
chore(indexeddb): Merge fixes
2022-05-02 12:07:40 +02:00
Benjamin Kampmann
392d48ba01
Merge remote-tracking branch 'origin/main' into gnunicorn/issue133
2022-05-02 11:51:26 +02:00
Benjamin Kampmann
d1aa463b7c
Apply suggestions from code review
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-05-02 11:43:37 +02:00
Benjamin Kampmann
fb8ddfa07d
style: Fixing name
2022-04-29 17:56:50 +02:00
Benjamin Kampmann
2803694cdf
ci(benchmarks): Adding Benchmarks to CI
2022-04-29 17:54:53 +02:00
Benjamin Kampmann
a7b8cc5810
ci: remove unnecessary dependency
2022-04-29 17:28:51 +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
Benjamin Kampmann
a70d05cb63
Merge branch 'main' into ben-ci-fixup
2022-04-29 15:15:46 +02:00
Benjamin Kampmann
5682b3bc09
ci(xtask): Adding fixup to xtask
2022-04-29 15:13:43 +02:00
Benjamin Kampmann
29674213e8
style: Cleanup styles with pre-commit
2022-04-29 14:52:41 +02:00
Benjamin Kampmann
9b6fe94bc8
ci(tooling): Improved Style Checking
...
- separate Styles from ci.yaml into its own for clarity
- extend pre-commit config with other useful defaults
- move clippy, tests and typos into a push-based pre-commit
2022-04-29 14:50:12 +02:00
Jonas Platte
c0c30438ab
chore: Upgrade Ruma to 0.6.1
2022-04-29 13:17:51 +02:00
Jonas Platte
814e415374
chore: Use new Ruma helper methods for some events
2022-04-29 13:03:50 +02:00
Jonas Platte
dfd193e3b0
chore: Change TOML inline tables to be single-line consistently
2022-04-29 13:03:50 +02:00
Jonas Platte
82164b098a
chore: Sort dependencies
...
Mostly automated (cargo sort --workspace).
2022-04-29 13:03:50 +02:00
Jonas Platte
4b1c77ec5a
chore: Use js Date.now() support from Ruma
2022-04-29 13:03:49 +02:00
Benjamin Kampmann
d9d143eba7
fix(sled-store): Seperate stripped and non-stripped buckets
2022-04-29 12:42:36 +02:00
Jonas Platte
097cb99ae5
chore: Make target-specific dependency formatting more consistent
...
* Put target-specific dependencies last
* Put cfg(wasm) before cfg(not(wasm))
* Use long table names only where lines get too long otherwise
2022-04-29 11:30:31 +02:00
Jonas Platte
aae8989f99
chore(sdk): Merge local import with file-level imports
2022-04-29 11:09:14 +02:00
Jonas Platte
70174e1fea
Upgrade Ruma to 0.6.0
2022-04-29 11:07:17 +02:00
Benjamin Kampmann
301cf3561f
chore(indexeddb): Fix merge leftover
2022-04-29 10:41:14 +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
9c6bc066f2
chore(CI): Add Wasm-Pack to CI
...
Merge pull request #619 from matrix-org/gnunicorn/issue617
2022-04-28 17:50:39 +02:00
Benjamin Kampmann
83b5d8f20e
style: cargo fmt
2022-04-28 17:32:54 +02:00
Benjamin Kampmann
ebd85ebaa2
feat(indexeddb): Add support for key backup v1
2022-04-28 17:31:09 +02:00
Denis Kasak
1962e7ec1d
Merge pull request #621 from matrix-org/dkasak/doc-improvements2
...
Document `OlmDecryptionInfo` and make it `pub(crate)`.
2022-04-28 14:35:32 +00:00
Denis Kasak
73bd3a0598
fix(crypto): Make OlmDecryptionInfo and decrypt_to_device_event pub(crate).
2022-04-28 16:21:39 +02:00
Denis Kasak
698ab5328f
docs(crypto): Document OlmDecryptionInfo and fix some errors.
2022-04-28 16:08:07 +02:00
Benjamin Kampmann
87ae677fc3
fix(ci): fixing it right this time
2022-04-28 13:15:27 +02:00
Benjamin Kampmann
5d3c14f309
fix(ci): fixing the wasm ci command
2022-04-28 13:12:06 +02:00
cutecutecat
33425a43d0
chore: Replace lazy_static with once_cell
2022-04-28 11:10:34 +00:00
Benjamin Kampmann
608eca6166
test(indexeddb): activate indexeddb tests for CI
2022-04-28 12:43:07 +02:00
Benjamin Kampmann
a49dfa8aa2
Merge branch 'main' into gnunicorn/issue133
2022-04-28 12:36:36 +02:00
Benjamin Kampmann
3caed26f93
test(base): fix wasm tests
2022-04-28 12:00:19 +02:00
Benjamin Kampmann
7aeb8cf482
style: cargo fmt
2022-04-28 11:24:59 +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
4b575d3d2b
style: newline
2022-04-28 11:08:03 +02:00
Benjamin Kampmann
0f2424d140
test(crypto): fix wasm tests
2022-04-28 11:06:35 +02:00
Benjamin Kampmann
9c80774140
feat(common-utils): helper for modified MilliSecondsSinceUnixEpoch
2022-04-28 11:06:35 +02:00
Benjamin Kampmann
d46b5ab0b6
tests: add js to get-random on matrix-sdk to allow compilation
2022-04-28 11:06:35 +02:00
Benjamin Kampmann
5b13cf4e92
Apply suggestions from code review
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-04-28 10:25:03 +02:00
Damir Jelić
649aff2c92
fix(crypto-ffi): Rename the error message field for MigrationError
...
The field is called message which clashes with the field of the same
name in the Kotlin Exception class.
2022-04-27 18:56:30 +02:00
Damir Jelić
5d8c485a51
chore: Bump most of our deps
2022-04-27 17:30:53 +02:00
Damir Jelić
d8ff18322e
feat(crypto-ffi): Allow unencrypted verification events to be handled
2022-04-27 17:30:41 +02:00
Damir Jelić
4780c560e1
feat(base): Pass unencrypted verification events to the olm machine
2022-04-27 17:30:41 +02:00
Damir Jelić
d94f415db4
feat(crypto): Allow unencrypted verification events to be handled
2022-04-27 17:30:41 +02:00
Benjamin Kampmann
4b6ed22476
chore(ci): install wasm-pack
2022-04-27 17:20:14 +02:00
Benjamin Kampmann
868afffc4d
formatting
2022-04-27 17:05:50 +02:00
Benjamin Kampmann
6a81ec226e
chore: enable wasm-pack tests in ci
2022-04-27 16:58:42 +02:00
Benjamin Kampmann
c0fc7c9f7e
chore: Adding ci-subcommand to xtask for testing
2022-04-27 16:50:27 +02:00
Benjamin Kampmann
1bf1147d18
fixing style
2022-04-27 16:22:47 +02:00
Benjamin Kampmann
2bdd44ce1d
Merge branch 'main' into gnunicorn/issue133
2022-04-27 15:45:39 +02:00
Julian Sparber
910bf531fe
feat(sdk): Add method to set whether a room is DM and store all targets
...
This ensures also that we use, for user verification, only a DM room with
no members other then ourself and the user to be verified.
2022-04-27 12:53:51 +02:00
Benjamin Kampmann
66fcc1e486
forgot two instances in rename
2022-04-27 12:36:19 +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
48cb625f19
fixing lints
2022-04-27 12:06:42 +02:00
Benjamin Kampmann
266d7c6da7
fixing last broken display_name tests
2022-04-27 12:06:15 +02:00
Benjamin Kampmann
b5ab076546
tests(matrix-sdk-base): allowing enable debugging logs for tests
2022-04-27 12:02:56 +02:00
Jonas Platte
e5c2ba4bd8
fix(sdk): Export RumaApiError
2022-04-26 19:16:36 +02:00
Kévin Commaille
d62cb9650f
Fix typo
2022-04-26 18:59:51 +02:00
Kévin Commaille
dfdaea786b
docs: Document RumaApiError variants
2022-04-26 18:49:21 +02:00
Damir Jelić
6e89ecfbf0
fix(indexeddb): Don't derive a StoreCipher twice if we're reusing the db
2022-04-26 18:46:55 +02:00
Damir Jelić
742c1944eb
fix(sled): Put the StoreCipher behind the Arc, not the Option
2022-04-26 18:46:55 +02:00
Damir Jelić
e1baa25713
fix(sled): Don't derive a StoreCipher twice if we're reusing the db
2022-04-26 18:46:55 +02:00
Kévin Commaille
189ae93e90
fix(sdk): Export RumaApiError
2022-04-26 18:17:04 +02:00
Benjamin Kampmann
4431a2d48a
fix(room name): check for proper type
2022-04-26 17:40:04 +02:00
Benjamin Kampmann
3cdee30fc1
fixing docs
2022-04-26 17:33:17 +02:00
Benjamin Kampmann
592a9338eb
style, and other fixes
2022-04-26 17:27:18 +02:00
Benjamin Kampmann
55b7fd617c
fix(indexeddb-store): implement merge room members
2022-04-26 17:04:46 +02:00
Benjamin Kampmann
ca2f598d9e
fix(sled-store): implement merge room members
2022-04-26 16:23:22 +02:00
Benjamin Kampmann
8cdfd43863
test(store): additional intergration test for stripped members
2022-04-26 15:38:58 +02:00
Benjamin Kampmann
e9e21c1b25
rename computed -> calculated
2022-04-26 15:34:49 +02:00
Benjamin Kampmann
61ea1c9003
Merge remote-tracking branch 'origin/main' into gnunicorn/issue133
2022-04-26 15:24:13 +02:00
Damir Jelić
39ef1d550d
chore(crypto): Improve a log line
2022-04-26 14:46:07 +02:00
Damir Jelić
a425ddf97f
fix(crypto): Don't try to encrypt a room key for our own device
2022-04-26 14:46:07 +02:00
Damir Jelić
d38995b3f9
fix(crypto): Add our own device to the store when we create a new account
2022-04-26 14:46:07 +02:00
Damir Jelić
3490a9f726
chore(crypto): Remove a useless compile_error! call
2022-04-26 13:56:45 +02:00
Damir Jelić
610e3ffc5f
fix(crypto): Be more restrictive around Megolm session rotation periods
2022-04-26 13:56:45 +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
2a11df01c7
chore(indexeddb): Remove unneeded matrix-sdk-common dependency
2022-04-26 11:40:54 +02:00
Jonas Platte
08fd85ea09
chore: Upgrade Ruma
2022-04-26 11:40:54 +02:00
Jonas Platte
32d1997dfc
feat(crypto): Accept borrowed identifiers in some public functions
2022-04-26 11:40:54 +02:00
Jonas Platte
00249ab96e
fix: Fix a typo
2022-04-26 11:40:54 +02:00
Damir Jelić
7710b0b14f
Merge branch 'poljar/encrypted-reactions-fix'
2022-04-26 11:22:39 +02:00
Damir Jelić
cc6e5b868e
chore(sdk): Use the % sigil to record room ids
2022-04-26 09:58:25 +02:00
Damir Jelić
5f83184512
fix(sdk): Don't encrypt reactions
2022-04-26 09:41:50 +02:00
Jonas Platte
16a35081ed
feat(sdk): Merge HttpError::{Api, ClientApi}
2022-04-25 19:55:56 +02:00
Jonas Platte
ddb6d6af90
chore: Fix typos
2022-04-25 19:42:06 +02:00
Damir Jelić
1f8f7c853b
docs(crypto-ffi): Slight docs improvements
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-04-25 14:22:01 +02:00
Damir Jelić
a25a88bd25
refactor(crypto-ffi): Use the anyhow Result type for the migration function
2022-04-25 14:22:01 +02:00
Damir Jelić
94832d1a8b
fix(crypto-ffi): Allow the machine to be opened with a passphrase
2022-04-25 14:22:01 +02:00
Damir Jelić
2552c0f393
docs(crypto-ffi): Add docs to the migrate method
2022-04-25 14:22:01 +02:00
Damir Jelić
797fbb2fda
feat(crypto-ffi): Add a progress listener to the migrate method
2022-04-25 14:22:01 +02:00
Damir Jelić
35d4749ba7
feat(crypto-ffi): Add support to migrate from a libolm based setup
2022-04-25 14:22:01 +02:00
Damir Jelić
c5ddca3bc4
feat(sled): Add a method to save tracked users in a batched way
2022-04-25 14:22:01 +02:00
Damir Jelić
a6b7c98002
feat(crypto): Add a public method to import private cross signing keys
2022-04-25 14:22:01 +02:00
Benjamin Kampmann
84b721abb0
Merge pull request #599 from zecakeh/pr-cov
...
ci: Run code coverage for pull requests
2022-04-25 14:07:27 +02:00
Benjamin Kampmann
7ea6cb3e95
rename Calculated -> Computed
2022-04-25 13:31:45 +02:00
Benjamin Kampmann
15e76b90b1
adding display name integration tests for DM invite
2022-04-25 13:29:59 +02:00
Kévin Commaille
5c41b992b7
ci: Add newline at end of codecov.yaml
...
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com >
2022-04-25 12:53:42 +02:00
Kévin Commaille
5ce6c07d9c
ci: Update codecov github action to v3
2022-04-25 12:44:33 +02:00
Kévin Commaille
8090220963
ci: Add codecov config file
...
Be tolerant for coverage of new PRs
2022-04-25 12:43:22 +02:00
Kévin Commaille
314a9dec6c
ci: Run code coverage for pull requests
2022-04-25 12:08:58 +02:00
Benjamin Kampmann
48fc26a35b
tests for broken room name
2022-04-22 17:45:27 +02:00
Benjamin Kampmann
b420d7022a
typed display name for i18n
2022-04-22 15:35:38 +02:00
Benjamin Kampmann
79e543eceb
fix(state-stores): ensure counter consistency
2022-04-21 16:20:24 +02:00
Benjamin Kampmann
375e976289
formatting
2022-04-21 13:02:55 +02:00
Benjamin Kampmann
071d440567
fix(indexeddb-store): always pad counter with u64 padding size to ensure order consistency
2022-04-21 12:56:32 +02:00
Benjamin Kampmann
d4053e2c54
fix(sled-store): save index as i64 to ensure portability
2022-04-21 12:53:10 +02:00
Benjamin Kampmann
a0ba610e0b
fixing wasm example
2022-04-20 16:35:55 +02:00
Benjamin Kampmann
c995331f57
fixing typo
2022-04-20 16:22:32 +02:00
Benjamin Kampmann
577b45f8ce
activate encryption on base if crypto-store is activated, handle non_exhaustive errors raised
2022-04-20 16:19:55 +02:00
Jonas Platte
0c7e0167c7
Merge pull request #592 from zecakeh/login-sso
2022-04-20 15:45:43 +02:00
Benjamin Kampmann
9761934bf5
fixing features in ci jobs
2022-04-20 15:43:57 +02:00
Kévin Commaille
04d62bbe1e
Apply suggestions to docs
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-04-20 15:35:54 +02:00
Benjamin Kampmann
115300fa5e
Addressing review comments
2022-04-20 15:27:41 +02:00
Benjamin Kampmann
ae8943e050
fixing style
2022-04-20 15:25:56 +02:00
Kévin Commaille
11292b5e5a
fix(sdk): Don't convert SSO login URL parse error to IoError.
2022-04-20 15:21:23 +02:00
Kévin Commaille
559fe35e1b
fix(sdk): Bind SSO login server to 127.0.0.1 instead of localhost
...
Avoid name resolution failure in some devices
2022-04-20 15:21:23 +02:00
Kévin Commaille
32b5e5d48b
feat(sdk): Improve docs for SSO login server's random ports
2022-04-20 15:21:14 +02:00
Benjamin Kampmann
3de9c54552
more feature related fixups
2022-04-20 14:39:42 +02:00
Benjamin Kampmann
b29a50bed5
moving make_store_config features back to sled, fxies #562
2022-04-20 14:36:11 +02:00
Benjamin Kampmann
d36220ed7c
e2e-encrypted weak feature dependency
2022-04-20 14:26:54 +02:00
Benjamin Kampmann
117fd1612b
explain in readme
2022-04-20 14:10:24 +02:00
Benjamin Kampmann
2c506717c8
setting rust-version
2022-04-20 14:08:27 +02:00
Damir Jelić
e57721be09
Merge branch 'poljar/session-timestamp-improvements'
2022-04-20 12:11:53 +02:00
Damir Jelić
954bba6fdf
fix(crypto): Don't put the session timestamps behind an Arc
2022-04-20 10:49:32 +02:00
Damir Jelić
edbf831a0f
fix(crypto): Make sure to sort the sessions by timestamp before encrypting
...
This ensures that we're using the correct Session even if our store
doesn't provide those in the correct order. The set is small anyways, so
this shouldn't have any performance impact.
2022-04-20 10:49:22 +02:00
Damir Jelić
c0172c4858
fix(crypto): Fix an error message
2022-04-20 10:49:22 +02:00
Benjamin Kampmann
06f5b67b23
feat(state_store): Store keys and values encrypted, too
...
Merge pull request #586 from matrix-org/ben-remove-store-key
This removes the store_key and replaces it with the new key cipher for both sled and indexeddb state stores. If they are given a passphrase, we are now encrypted/hashing all keys and values stored in the store, no leaking of metadata in any key or value anymore.
2022-04-19 16:46:11 +02:00
Benjamin Kampmann
07c5f625d4
fixing encryption examples
2022-04-19 16:30:20 +02:00
Benjamin Kampmann
805044ed41
Merge branch 'ben-remove-store-key' of github.com:matrix-org/matrix-rust-sdk into ben-remove-store-key
2022-04-19 16:23:29 +02:00
Benjamin Kampmann
4da7d31770
fixing unnecessary lifetimes
2022-04-19 16:22:25 +02:00
Benjamin Kampmann
cdab735ce5
Apply suggestions from code review
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-04-19 16:19:30 +02:00
Benjamin Kampmann
e989b9aff7
merge sledstore's EncodeKey and SecureEncodeKey into one
2022-04-19 16:01:18 +02:00
Damir Jelić
a8466f5069
refactor(crypto): Use the ruma time types for group sessions as well
2022-04-19 14:07:44 +02:00
Damir Jelić
95a3fe136d
refactor(crypto): Use the ruma time types for the Session timestamps
2022-04-19 14:03:31 +02:00
Benjamin Kampmann
88d1aa615c
remove unnecessary reference making
2022-04-19 12:42:39 +02:00
Benjamin Kampmann
ac8500759c
newline
2022-04-19 12:27:11 +02:00
Benjamin Kampmann
07f01eb985
typos
2022-04-19 12:26:27 +02:00
Benjamin Kampmann
953d759238
sort and typo
2022-04-19 12:21:26 +02:00
Benjamin Kampmann
9d09401ede
.into instead of ::from
2022-04-19 12:20:41 +02:00
Benjamin Kampmann
872f32a7e0
sorting line order
2022-04-19 12:08:26 +02:00
Benjamin Kampmann
05b3077a7a
fixing lints again
2022-04-19 11:00:13 +02:00
Benjamin Kampmann
8fdd8648c7
Merge remote-tracking branch 'origin/main' into ben-remove-store-key
2022-04-19 10:41:40 +02:00
Benjamin Kampmann
4e8383ea4f
fixing clippy lints
2022-04-19 09:26:28 +02:00
Benjamin Kampmann
80791860fe
fixing style and typos
2022-04-19 09:23:29 +02:00
Benjamin Kampmann
9698a50ad8
fixing timeline for encrypted indexeddb store
2022-04-13 15:52:57 +02:00
Benjamin Kampmann
a390c3b40b
more explicit naming
2022-04-13 15:52:10 +02:00
Benjamin Kampmann
70a5517c5c
make room timeline test more debuggable
2022-04-13 15:23:50 +02:00
Benjamin Kampmann
262bee51b1
also implement room timeline in encrypted fashion on sled store
2022-04-13 15:23:14 +02:00
Benjamin Kampmann
897bb5aed2
new db for every encrypted test
2022-04-12 20:00:11 +02:00
Benjamin Kampmann
24266fe254
fixing ranges
2022-04-12 19:59:55 +02:00
Benjamin Kampmann
5d6c4852b1
fix media content test
2022-04-12 19:37:43 +02:00
Benjamin Kampmann
64e0356756
implementing encrypted keys
2022-04-12 19:17:49 +02:00
Benjamin Kampmann
b611aa2503
remove store key feature and references
2022-04-12 16:58:56 +02:00
Benjamin Kampmann
1cdde23bc4
replace storeky with storecipher in wasm
2022-04-12 16:50:58 +02:00
Benjamin Kampmann
b3c8f80b6e
expose internal functionality for wasm-based storage
2022-04-12 16:50:44 +02:00
Jonas Platte
35f598a095
fix(sdk): Change the default guest_access state to Forbidden
2022-04-12 14:39:30 +02:00
Jonas Platte
ad538f3f28
Upgrade Ruma
2022-04-12 14:39:30 +02:00
Jonas Platte
073d9db29f
chore(crypto): Remove redundant match arms
2022-04-12 14:39:30 +02:00
Benjamin Kampmann
cebe7bee92
adding encrypted tests for indexeddb store
2022-04-12 13:11:59 +02:00
Damir Jelić
7bd0f2c50c
chore(sled): Fix a clippy warning
2022-04-12 13:06:17 +02:00
Benjamin Kampmann
fb8f123616
fixing remaining key lookup
2022-04-12 12:44:34 +02:00
Damir Jelić
87632e7ead
chore(crypto): Update vodozemac
2022-04-12 12:37:56 +02:00
Benjamin Kampmann
88be0ee9c1
fix user id streams
2022-04-12 12:24:11 +02:00
Benjamin Kampmann
000be73e80
making tests more explicit
2022-04-11 23:47:20 +02:00
Benjamin Kampmann
551711261d
integration tests for encrypted version
2022-04-11 22:49:09 +02:00
Benjamin Kampmann
918d95a672
first batch of data for testing encrypted sled store
2022-04-11 22:11:14 +02:00
Benjamin Kampmann
f79e6b87e2
use result
2022-04-11 20:42:35 +02:00
Benjamin Kampmann
529d1e0117
removing store key from sled store - for values
2022-04-11 13:52:08 +02:00
Jonas Platte
0dafd8cd65
chore: Update all unit test module names to the conventional 'tests'
2022-04-08 12:35:54 +00:00
Jonas Platte
1dbb0226ad
feat(sdk): Check server versions after creating the Client
2022-04-08 14:16:55 +02:00
Damir Jelić
05826de639
fix(crypto): Box the RecoveryKey array so moves don't copy the key
2022-04-06 10:02:00 +02:00
Damir Jelić
4e05fe9f4a
refactor(crypto): Simplify the Signing struct
2022-04-06 09:24:57 +02:00
Damir Jelić
26172ded49
ci: Test the WASM example in the CI run
2022-04-05 14:57:13 +02:00
Damir Jelić
814d4dcb8b
chore(xtask): Check the wasm example when running the wasm tests
2022-04-05 14:47:24 +02:00
Damir Jelić
b9f415e81e
chore(sdk): Fix some clippy lints in the wasm example
2022-04-05 14:47:01 +02:00
Damir Jelić
124efe6f67
ci(wasm): Emscripten isn't needed anymore
2022-04-05 14:02:07 +02:00
Damir Jelić
f2e2976496
fix(sdk): Make the wasm_command_bot example compile and work
...
This patch does a couple of things:
1. Fix the compilation of the example, Message -> MessageLike
2. Update Webpack and friends for the example
3. Remove futures-timer's Delay method and use equivalent methods from
Tokio and wasm-timers.
The last point was needed because futures-timer would end up triggering
this error:
ReferenceError: can't access lexical declaration '__wbg_clearTimeout_d8b36ad8fa330187' before initialization
2022-04-05 14:02:07 +02:00
Benjamin Kampmann
44be0cf12a
chore(base): Make fields of RoomInfo and BaseRoomInfo private
...
Merge pull request #569 from matrix-org/jplatte/room-info-privacy
2022-04-05 11:20:12 +02:00
Benjamin Kampmann
64d9a1f633
docs: Add example to print the room history
...
Merge pull request #566 from jsparber/add_timeline_example
2022-04-04 17:21:14 +02:00
Jonas Platte
6f9664c9f4
chore(base): Make fields of RoomInfo and BaseRoomInfo private
2022-04-04 16:35:07 +02:00
Julian Sparber
f1c1b3d319
example: Require sled-state-store for timeline example
2022-04-04 15:33:04 +02:00
Damir Jelić
6007aa7056
fix(crypto): Add some missing zeroization calls in the key export logic
2022-04-04 13:34:13 +02:00
Kévin Commaille
acd8ecbd22
feat(sdk): Retrieve account data from room::Common
2022-04-04 12:15:12 +02:00
Jonas Platte
eab68131e7
chore: Split auxiliary tools into separate crates
2022-03-31 14:37:52 +02:00
Julian Sparber
8807a2abaf
Add example to print the room history
2022-03-31 14:37:38 +02:00
Jonas Platte
e2aab504fb
Move sled state inspector into a separate crate
2022-03-31 14:26:32 +02:00
Jonas Platte
9567f8f28f
Move the crypto benchmarks into a separate crate
...
Avoids issues from circular dev-dependency.
2022-03-31 14:26:32 +02:00
Damir Jelić
1e09577a8a
chore: Make the Verification and OpenStoreError enums non exhaustive
2022-03-30 13:47:56 +02:00
Damir Jelić
155abb262b
chore(crypto-ffi): Add a wildcard pattern to the store opening
...
This is only useful in our workspace, the workspace enables the
state-store in the matrix-sdk-sled crate, which turns an additional enum
variant on.
2022-03-30 13:47:56 +02:00
Damir Jelić
8782e0068f
chore(sdk): Add a wildcard match for the verifcation enum conversion
...
This is needed because we now have multiple consumers of the
matrix-sdk-crypto crate in the workspace. The different consumers
might enable different feature sets.
Compilation of the workspace might fail if the qrcode feature is enabled
on the `matrix-sdk-crypto` crate but disabled on the `matrix-sdk` crate.
This patch adds a wildcard pattern to the Verification enum so we handle
the case where the matrix-sdk qrcode feature remains disabled.
2022-03-30 13:47:56 +02:00
Damir Jelić
66e4ea979c
refactor(crypto-ffi): Use a type alias for the encrypted event type
2022-03-30 13:47:56 +02:00
Damir Jelić
a957a02d5d
refactor(crypto-ffi): Use the parse methods to parse identifiers
2022-03-30 11:10:46 +02:00
Damir Jelić
8079da7b0a
chore(crypto-ffi): Use the the latest matrix-sdk-crypto crate.
2022-03-30 10:44:39 +02:00
Damir Jelić
8793efebc7
chore(crypto): Expose the types module publicly
2022-03-30 10:44:39 +02:00
Damir Jelić
f5d2ea0efa
fix(sdk): Use a consistent naming scheme for our features
2022-03-30 10:26:38 +02:00
Damir Jelić
e720b4d5e3
chore(sdk): Fix a clippy warning for the sso_login feature
2022-03-30 10:26:38 +02:00
Damir Jelić
d3f4db258f
chore(crypto): Remove some dead code mentioning the sled_cryptostore feature
2022-03-30 10:26:38 +02:00
Damir Jelić
13d1048d7e
fix(sled): Allow the crypto-store to be used without the state-store
2022-03-30 10:26:38 +02:00
Jonas Platte
d9001409a2
chore(sdk): Remove qrcode from default features
...
Breaking change: If you need QR code support, you now need to enable the
qrcode feature on the matrix-sdk crate.
2022-03-30 10:03:29 +02:00
Jonas Platte
890c191884
Clean up toml formatting
2022-03-30 10:03:29 +02:00
Jonas Platte
8d3441b51b
Deduplicate / clean up EncodeKey trait
2022-03-30 10:03:29 +02:00
Jonas Platte
1912a63f17
chore(indexeddb): Implement SafeEncode for RoomAccountDataEventType
2022-03-30 10:03:29 +02:00
Jonas Platte
e4c6040de4
Generalize SafeEncode tuple implementations
2022-03-30 10:03:29 +02:00
Jonas Platte
b8c7ab9867
fix(indexeddb): Add missing as_encoded_string call
2022-03-30 10:03:29 +02:00
Jonas Platte
d56d50e96f
Use field shorthands in tracing macros
...
Automated using search `\b(\w+) = \?\1` => replace `?$1`.
2022-03-30 10:03:29 +02:00
Jonas Platte
f375d8c141
Move ? in tracing macros away from =
...
To make it obvious that it's more like a modifier to the field value,
rather than a single `=?` operator.
2022-03-30 10:03:29 +02:00
Jonas Platte
7f9e1c8799
Remove unnecessary uses of event content enums
2022-03-30 10:03:29 +02:00
Jonas Platte
ed52cfc43c
fix(base): Propagate push rules deserialization errors
...
… from BaseClient::get_push_rules.
2022-03-30 10:03:29 +02:00
Jonas Platte
09893651a4
Remove unnecessary allocations
2022-03-30 10:03:29 +02:00
Benjamin Kampmann
7e48034cc8
Merge pull request #555 from jsparber/fix_timeline
...
store: Make sure that event position in store is contiguous
2022-03-29 12:26:27 +02:00
Jonas Platte
8815e77576
chore: Upgrade Ruma
2022-03-28 18:21:32 +02:00
Jonas Platte
db9b3febd3
Upgrade Ruma
2022-03-28 17:54:06 +02:00
Damir Jelić
36d1ba34a9
chore(crypto): Rename the Other key enum variant into Unknown
2022-03-28 17:05:00 +02:00
Damir Jelić
105961a78d
chore(crypto): Change the expect message for device key serialization
...
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com >
2022-03-28 17:05:00 +02:00
Damir Jelić
23040a1bf7
refactor(crypto): Use vodozemac types for the cross signing and device keys
2022-03-28 17:05:00 +02:00
Julian Sparber
07066e1c1f
store: Make sure that event position in store is contiguous
...
This fixes the breaking gap in the timeline when reading the events from
store.
2022-03-28 15:50:48 +02:00
Damir Jelić
4b58017951
chore(crypto): Add umlauts to a copyright holder
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-03-28 14:24:38 +02:00
Damir Jelić
5db5341974
chore(crypto): Use a specialized CrossSigning type
2022-03-28 13:53:01 +02:00
Damir Jelić
9a3d097331
chore(crypto): Use a specialized DeviceKeys type
2022-03-28 13:53:01 +02:00
Damir Jelić
c50b369d72
fix(crypto): Remove some unwraps when creating inbound sessions
2022-03-28 13:48:18 +02:00
Julian Sparber
28893ec388
fix(store): Fix sync message order
2022-03-25 14:47:55 +01:00
Damir Jelić
6968edd704
feat(crypto): Start uploading fallback keys to the server
2022-03-25 13:11:53 +01:00
Damir Jelić
f4010b597f
feat(crypto): Use a specialized SignedKey type instead of the Ruma type
2022-03-25 13:11:53 +01:00
Damir Jelić
2bacbf1b53
feat(crypto): Add a store error variant for breaking database format changes
2022-03-25 11:15:29 +01:00
Damir Jelić
0ce74b956c
fix(sled): Throw an error if we can't upgrade our database
2022-03-25 11:15:29 +01:00
Damir Jelić
e2725483e4
refactor(crypto): Make it clear that olm decryption failures are normal
2022-03-25 11:15:29 +01:00
Damir Jelić
03990ab19e
test(crypto): Improve the device saving test
...
The test didn't check if we can actually save/restore multiple devices,
this patch fixes this.
2022-03-25 11:15:29 +01:00
Damir Jelić
8b89023aff
feat(indxeddb): Use the new store-cipher to encrypt our values
2022-03-25 11:15:29 +01:00
Damir Jelić
75de41bb2e
feat(sled): Use the new store cipher to encrypt our keys and values
2022-03-25 11:15:29 +01:00
Damir Jelić
54e555f295
refactor(crypto): Don't use getrandom directly, we already use the rand crate
2022-03-25 11:15:29 +01:00
Damir Jelić
dbb500c4b8
feat(crypto): Switch to vodozemac for the olm/megolm support
2022-03-25 11:15:29 +01:00
Damir Jelić
61ca5c7aab
fix(base): Make room invitations for previously-left rooms work
2022-03-24 12:35:08 +01:00
Jonas Platte
ae3b4f6640
Add a failing test for room invitations putting a left room back into invited
2022-03-24 12:21:21 +01:00
Jonas Platte
9ff6c1bc16
chore(base): Simplify BaseRoomInfo::handle_state_event
2022-03-23 14:25:14 +01:00
Jonas Platte
68a6655cb4
chore(base): Get rid of confusing double-as_ref
2022-03-23 14:25:14 +01:00
Alexandra
ec97c354e2
feat(sdk): Detect invalid .well-known endpoint response
2022-03-23 11:57:13 +01:00
Jonas Platte
db079065e4
refactor(sdk): Some cleanup of the HTTP code
2022-03-23 11:29:12 +01:00
Jonas Platte
cbebf8c4fe
Don't import reqwest::Client
...
… to avoid confusion with the SDKs Client type.
2022-03-23 11:04:28 +01:00
Jonas Platte
92a532a4ba
Inline single-use method HttpClient::send_request
2022-03-23 10:50:15 +01:00
Jonas Platte
4601b43651
Remove unnecessary specialized send-request method from HttpClient
2022-03-23 10:43:14 +01:00
Benjamin Kampmann
9ebabf818d
Chore: Add tracing span to request sending
2022-03-21 20:45:22 +01:00
Jonas Platte
68385f0ff7
Add tracing span to request sending
2022-03-18 14:40:26 +01:00
Jonas Platte
3b1400b6f8
Merge pull request #539 from matrix-org/jplatte/cleanup
2022-03-17 14:44:30 +01:00
Jonas Platte
5b5e13fe2c
Remove request field from Client::keys_upload tracing span
...
It results in a lot of log noise for initial syncs.
2022-03-17 14:26:28 +01:00
Jonas Platte
7b8568f5c8
Simplify get_or_upload_filter example
2022-03-17 14:24:50 +01:00
Jonas Platte
ea3ca1a8ca
Remove unnecessary semicolons after if-let expressions
2022-03-17 14:23:55 +01:00
Jonas Platte
baa869552f
Implement Default for SyncSettings in terms of SyncSettings::new
...
… rather than the other way around.
2022-03-17 14:23:11 +01:00
Jonas Platte
c9c31fa1c2
Simplify SyncSettings::default()
2022-03-17 14:22:40 +01:00
Jonas Platte
5ff38eff00
Activate tracing-subscriber's env-filter feature
...
This allows the log level of examples to be controlled using the
RUST_LOG environment variable.
2022-03-17 14:22:12 +01:00
Jonas Platte
f9420acdfd
Remove unhelpful Client self fields from tracing spans
...
Client's Debug implementation just returns "Client".
2022-03-17 14:21:41 +01:00
Jonas Platte
c83f8f2a45
feat(sdk): Add convenience methods for getting state events of statically-known type
2022-03-16 14:26:18 +01:00
Damir Jelić
4741df627d
feat(sdk): Add a method to check if the other side has scanned a qr verification
2022-03-16 14:23:35 +01:00
Julian Sparber
04e5434c9a
QrVerification: Use consistent name for re-exported method
2022-03-16 14:06:26 +01:00
Julian Sparber
adf463a4be
QrVerification: expose whether the QrCode was scanned by the other device
2022-03-16 13:05:15 +01:00
Damir Jelić
a455f23520
docs(store-cipher): Make the docs about the way the StoreCipher works clearer
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-03-16 12:48:16 +01:00
Damir Jelić
3af08059da
fix(store-cipher): Use the MacKeySeed type alias in more places
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-03-16 12:48:16 +01:00
Damir Jelić
bf3d2ebea3
chore(store-cipher): Rename the store-key crate and it's main type
2022-03-16 12:48:16 +01:00
Damir Jelić
8ab7bfd5fa
fix(store-key): Zeroize the derived MacKeys
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-03-16 12:48:16 +01:00
Damir Jelić
d03eefc49a
docs(store-key): Improve the docs a bit
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-03-16 12:48:16 +01:00
Damir Jelić
5766b65eeb
feat(store-key): Add a feature flag to enable WASM support
2022-03-16 12:48:16 +01:00
Damir Jelić
11d27007fc
fix(store-key): Add some missing zeroize calls
2022-03-16 12:48:16 +01:00
Damir Jelić
4ed06be10d
chore(store-key): Add more crate metadata
...
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com >
2022-03-16 12:48:16 +01:00
Damir Jelić
6a0bda47ae
chore(store-key): Rename the crate
...
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com >
2022-03-16 12:48:16 +01:00
Damir Jelić
41466eae66
feat(store-key): Add a dedicated store key crate
...
This crate can be used to add at-rest encryption support for a
matrix-sdk state store or crypto store.
2022-03-16 12:48:16 +01:00
Damir Jelić
440b49ce5c
feat(sdk): Add store specific errors to the ClientBuildError
...
This makes it easier to handle store specific errors while building a
Client as long as the user is using one of our main stores.
2022-03-16 12:29:10 +01:00
Kévin Commaille
7b8c52b043
indexeddb: Move attribute below docs
2022-03-16 10:30:56 +01:00
Kévin Commaille
3a94c2115f
sdk: Add store opening errors to ClientBuildError
2022-03-15 14:43:02 +01:00
Kévin Commaille
6785c07793
indexeddb: Make store opening error more specific
2022-03-15 14:43:02 +01:00
Kévin Commaille
e23b22857f
sled: Make store opening error more specific
2022-03-15 14:42:54 +01:00
Jonas Platte
3bf5388da0
feat(sdk): Fetch supported matrix versions from server in initialization
2022-03-14 15:23:13 +01:00
Jonas Platte
15df8fef95
Fix broken tests
2022-03-14 15:08:54 +01:00
Jonas Platte
8df7e1cc8b
Fix hanging tests
2022-03-14 15:08:48 +01:00
Jonas Platte
7b2dfa39cf
Remove Client::get_supported_versions
...
This is now always done as part of constructing the Client, unless the
user actively opted out.
2022-03-14 12:57:58 +01:00
Jonas Platte
fdc8f79728
Merge branch 'main' into jplatte/server-versions
2022-03-14 12:56:57 +01:00
Benjamin Kampmann
f76bcda64f
feat(client): Replacing ClientConfig with a ClientBuilder to configure how the client will be set up
...
Merge pull request #533 from matrix-org/jplatte/client-builder
2022-03-14 12:43:38 +01:00
Jonas Platte
718fa18e7f
Merge branch 'main' into jplatte/client-builder
2022-03-14 11:26:45 +01:00
Damir Jelić
b8b61ce214
refactor(sdk): Scope the encryption specific Client methods behind a struct
2022-03-14 10:16:19 +01:00
Jonas Platte
a2ad774112
Add ClientBuilder::server_name
2022-03-14 10:02:31 +01:00
Jonas Platte
d94ba8c64f
Remove Client::for_user_id
2022-03-14 10:02:31 +01:00
Jonas Platte
81d07d886c
Rename Client::{new_from_user_id => for_user_id}
2022-03-13 19:56:26 +01:00
Jonas Platte
147e948fe6
Replace ClientConfig with ClientBuilder
...
This includes a few not-strictly-related changes that made sense to do at the
same time:
* Check for a functioning homeserver via get_supported_versions regardless of
whether a homeserver URL or user ID was supplied
* Rename use_discovery_response to respect_login_well_known
* Small appservice documentation improvement because those docs had to be
touched anyways
* Some test refactorings in tests that had to be touched anyways
2022-03-13 19:56:26 +01:00
Kévin Commaille
d8c7fbd9dc
sdk: Create Encryption struct
...
Lower the API surface of Client
2022-03-12 13:30:55 +01:00
Jonas Platte
bd7fbea155
Fix intra-doc link
2022-03-11 18:04:32 +01:00
Jonas Platte
628e2fb716
Allow configuring assert_identity on the client level only
...
Completely removing it from RequestConfig is left up to a future refactoring.
2022-03-11 15:31:11 +01:00
Jonas Platte
503f4d73a0
Merge pull request #532 from matrix-org/jplatte/ctors
2022-03-11 13:05:20 +01:00
Jonas Platte
8a927df2b3
Rename PrivateCrossSigningIdentity::{new_with_account => with_account}
2022-03-11 12:48:30 +01:00
Jonas Platte
14ddcfb06e
Remove new_ prefix from ToDeviceRequest ctors
2022-03-11 12:48:30 +01:00
Jonas Platte
932ef6270b
Remove new_ prefix from OlmMachine ctors
2022-03-11 12:48:30 +01:00
Jonas Platte
1be68f57a5
Merge BaseClient impl blocks
2022-03-11 12:36:08 +01:00
Jonas Platte
cfdf4a032e
Rename BaseClient::{new_with_store_config => with_store_config}
2022-03-11 12:36:08 +01:00
Jonas Platte
f5a7a1bcf0
Rename AppService::{new_with_config => with_config}
2022-03-11 12:36:08 +01:00
Jonas Platte
e60b07336d
Rename Client::{new_with_config => with_config}
2022-03-11 12:36:08 +01:00
Jonas Platte
48660c482f
Use regular builder pattern for ClientConfig::store_config
2022-03-11 12:36:00 +01:00
Jonas Platte
27ee7c32ca
Remove new_with_* constructors for StoreConfig
...
The regular builder pattern works just fine for the stores.
2022-03-11 11:49:01 +01:00
Benjamin Kampmann
88f1552a70
feat(stores): Improve Store initialisation to allow for reusing the same instance
...
Merge pull request #523 from zecakeh/stores
2022-03-11 11:40:12 +01:00
Kévin Commaille
faa5cf54eb
indexeddb: Make make_store_config public
2022-03-10 17:42:37 +01:00
Kévin Commaille
2bdc754140
ci: Lint matrix-sdk-crypto with a separate command
2022-03-10 17:29:20 +01:00
Kévin Commaille
597999acba
sdk-base: Add constructors with stores for StoreConfig
2022-03-10 17:29:19 +01:00
Kévin Commaille
81605b731d
sdk-base: Fix wording on StoreConfig docs
2022-03-10 17:29:19 +01:00
Kévin Commaille
d7673257b4
stores: Rename make_config to make_store_config
2022-03-10 17:29:19 +01:00
Kévin Commaille
54c8b4f8bb
sdk-base: Remove BaseClientConfig
2022-03-10 17:29:15 +01:00
Kévin Commaille
ad31540b10
sdk: Don't enable store encryption by default
2022-03-10 17:28:34 +01:00
Kévin Commaille
8c7bbb0e07
sdk: Update store setup instructions for encryption.
2022-03-10 17:22:36 +01:00
Kévin Commaille
0f60dfcfc5
sdk: Re-export stores and store config
2022-03-10 17:15:18 +01:00
Kévin Commaille
0327b4f8fc
indexeddb: Add methods to create a StoreConfig
2022-03-10 17:15:18 +01:00
Kévin Commaille
4b7f05e913
sled: Add a method to create a StoreConfig
2022-03-10 17:15:18 +01:00
Kévin Commaille
0ea12b3b4a
base: Separate store config from the client config
2022-03-10 17:15:18 +01:00
Kévin Commaille
28a83da421
sdk: Remove default store constructors
2022-03-10 17:15:14 +01:00
Kévin Commaille
4d41f94199
sled: Add helper to open stores for encryption
2022-03-10 17:14:01 +01:00
Kévin Commaille
692f95da79
sled: Add method to create CryptoStore from StateStore
...
Allow to use the same database for both stores
2022-03-10 17:14:00 +01:00
Jonas Platte
872c35efd2
Fix a typo
2022-03-10 16:52:01 +01:00
Jonas Platte
65e7688a3f
Don't require discovery to be mocked in tests
2022-03-10 16:05:51 +01:00
Jonas Platte
b1f2adf9c0
Ensure random request with Request: Send gets a Send future as well
2022-03-10 15:01:10 +01:00
Jonas Platte
81cea84a37
Fetch supported matrix versions from server in initialization
2022-03-10 15:00:40 +01:00
Jonas Platte
5f8d3dec82
Merge pull request #529 from matrix-org/jplatte/event-type
...
Use fine-grained *EventType types
2022-03-10 14:49:31 +01:00
poljar
e5359826e1
Merge pull request #528 from matrix-org/backup-fix
...
Fix the room key backup support in the crypto crate
2022-03-10 14:10:18 +01:00
Jonas Platte
1dec224210
Use fine-grained *EventType types
2022-03-10 13:54:00 +01:00
Damir Jelić
691ea2d138
ci(crypto): Test the crypto crate features when we run the CI
2022-03-10 13:52:31 +01:00
Damir Jelić
4af4faacef
feat(xtask): Add a task to check the crypto crate features
2022-03-10 13:52:31 +01:00
Damir Jelić
54a253c0bf
fix(crypto): Make our backup feature compile again
2022-03-10 13:50:29 +01:00
Jonas Platte
89ff804333
Remove extraneous newline
2022-03-10 13:49:40 +01:00
Jonas Platte
4d16370dba
Merge pull request #527 from matrix-org/jplatte/wasm-ci
2022-03-10 13:49:16 +01:00
Jonas Platte
30b3bd1c3d
Delete complicated and partially broken wasm tests
2022-03-10 13:18:59 +01:00
Jonas Platte
ff15ccaf28
Merge pull request #525 from matrix-org/jplatte/refactor
2022-03-10 12:56:05 +01:00
Jonas Platte
6af9285874
Don't use Raw::from_json where it's not needed
2022-03-10 11:59:31 +01:00
Jonas Platte
9154e93089
Allow other tests to continue when indexeddb test fails
2022-03-10 11:41:01 +01:00
Jonas Platte
ea2c9a2986
ci: Use clippy instead of check for wasm checks
2022-03-10 11:28:55 +01:00
Jonas Platte
c01475701d
Move some wasm CI logic into xtask
2022-03-10 11:02:16 +01:00
Jonas Platte
0721c7ddb2
Add missing ci subcommand description
2022-03-10 10:30:56 +01:00
Jonas Platte
36e4836c06
Merge pull request #522 from matrix-org/jplatte/send-req-refactor
2022-03-10 10:25:50 +01:00
Jonas Platte
b777617515
Replace matches! with ==
2022-03-10 10:12:53 +01:00
Jonas Platte
8a60154882
Use only #[warn], not #[deny] for lints
...
CI passes `-D warnings` to clippy, so there it will be an error either way.
For local development it is nice not to block compilation of dependent
crates on lints though.
2022-03-09 18:13:04 +01:00
Jonas Platte
d2e70c16b4
Deduplicate lint configuration
2022-03-09 18:09:02 +01:00
Jonas Platte
e6d20265bf
Allow rustfmt to format the encryption module again
2022-03-09 18:01:48 +01:00
Jonas Platte
5602deb226
Move encryption module docs into a separate markdown file
2022-03-09 18:00:57 +01:00
Jonas Platte
e4289405f5
Stop importing Result as StdResult
...
The SDK's Result aliases can optionally take the error parameter, so
there is no need to disambiguate this way.
2022-03-09 17:56:26 +01:00
Jonas Platte
76973fdc30
Improve consistency across sending requests with/out identity assertion
2022-03-09 16:48:28 +01:00
Jonas Platte
d5d6b80e08
Inline single-callsite request serialization functions
2022-03-09 15:13:06 +01:00
Jonas Platte
1ed2b8841d
Simplify HTTP request serialization logic
...
… the removed AuthenticationRequired branch was not necessary, Ruma's
`try_into_http_request` will take care of reporting the error.
2022-03-09 15:13:06 +01:00
Jonas Platte
a33898847b
Reduce duration of holding session lock
...
… by cloning the access token out.
2022-03-09 15:13:06 +01:00
Jonas Platte
bc1eb9a792
Merge pull request #521 from matrix-org/jplatte/appservice-refactor
2022-03-09 13:15:59 +01:00
Jonas Platte
3b3fede756
Merge pull request #520 from matrix-org/jplatte/clippy
2022-03-09 12:55:27 +01:00
Jonas Platte
9f72eb9490
Enable more default-off clippy lints
2022-03-09 12:41:57 +01:00
Jonas Platte
2c181bca4f
Consistently use .to_owned() instead of .to_string() for &str => String
2022-03-09 12:41:57 +01:00
Jonas Platte
b67c51c267
Remove unnecessary double reference
2022-03-09 12:41:57 +01:00
Jonas Platte
7fee5b59e8
crypto: Use Box<UserId> instead of String in SignatureError
...
… to make the field's meaning more obvious.
2022-03-09 12:41:56 +01:00
Jonas Platte
5d6f66be54
appservice: Make warp a regular dependency
...
It was optional but always required to be activated.
2022-03-09 10:35:39 +01:00
Jonas Platte
5075c2730c
Move appservice CI logic into xtask
2022-03-09 10:35:11 +01:00
Jonas Platte
1d5ba87b72
ci: Simplify test command by using -p instead of --manifest-path
2022-03-09 10:35:11 +01:00
Damir Jelić
4fa44f90bb
Merge branch 'appservice/fix-user-room-query'
2022-03-09 09:08:04 +01:00
Johannes Becker
a86da98cc2
fix(appservice): urldecode ids for user/room queries
2022-03-07 16:51:06 +01:00
Damir Jelić
6dff06579c
fix(sdk): Ensure that our login_with_sso() Client method is Send
2022-03-07 14:43:42 +01:00
Julian Sparber
38cbf24e8e
Add back homeserver logging for sso login
...
We can't use `.await` inside `info!()` because of
https://github.com/rust-lang/rust/issues/93274
2022-03-07 14:12:00 +01:00
Julian Sparber
642c4f5cfc
Ensure Client::login_with_sso() to be send
...
This removes the `info!()` log because of
https://github.com/rust-lang/rust/issues/93274
2022-03-07 13:11:52 +01:00
Damir Jelić
89e4d47ee1
chore: Bump the dashmap version across our crates
2022-03-07 09:58:00 +01:00
Jonas Platte
896d451c47
Merge pull request #515 from matrix-org/jplatte/ci
2022-03-04 12:10:47 +01:00
Jonas Platte
abe0bf0a29
Enable some useful non-default rustc lints
2022-03-04 11:35:24 +01:00
Jonas Platte
804c8e6c43
ci: Add test and test-features xtask commands
2022-03-04 10:59:17 +01:00
Jonas Platte
b64d855b25
ci: Fix inconsistent formatting
2022-03-04 10:59:17 +01:00
Jonas Platte
beb4ecb581
ci: Remove mentions of non-existant matrix variables
2022-03-04 10:59:17 +01:00
Jonas Platte
ed7667dc8d
ci: Remove unnecessary ${{ }}
2022-03-04 10:59:17 +01:00
Jonas Platte
e136199bfd
ci: Don't run check / build before test
...
It is redundant.
2022-03-04 10:59:17 +01:00
Damir Jelić
95665c8bc0
Merge branch 'poljar/matrix-crypto-ffi'
2022-03-04 10:27:12 +01:00
Damir Jelić
6bb8fd7853
feat: Import the Uniffi based matrix-sdk-crypto bindings
2022-03-04 09:45:50 +01:00
Benjamin Kampmann
b3038545f5
feat(stores): Splitting Sled and Indexeddb Store into separate crates
...
More details in pull request #498 .
2022-03-03 16:32:31 +01:00
Benjamin Kampmann
44fe3a62a1
remove unneeded helper function
2022-03-03 15:38:22 +01:00
Benjamin Kampmann
ba1b3e0c7c
fix the indexeddb tests, that clippy tried to fix
2022-03-03 15:27:21 +01:00
Benjamin Kampmann
6435ea655b
fix testing function wrongly exposed
2022-03-03 13:47:25 +01:00
Benjamin Kampmann
193a5ed3c9
fixing if syntax
2022-03-03 13:07:09 +01:00
Benjamin Kampmann
4e6b80d7df
fix docs
2022-03-03 13:05:32 +01:00
Benjamin Kampmann
e7fb512ae6
adding another encryption wasm tests
2022-03-03 12:59:23 +01:00
Benjamin Kampmann
ab57fb329f
Addressing review remark
2022-03-03 12:57:15 +01:00
Benjamin Kampmann
fd6f4385d4
Merge remote-tracking branch 'origin/main' into ben-splitting-out-store-impls
2022-03-03 12:57:00 +01:00
Jonas Platte
e03ee913f8
Merge pull request #513 from matrix-org/jplatte/xtask
2022-03-03 12:10:02 +01:00
Benjamin Kampmann
8aed72a085
Update crates/matrix-sdk-crypto/src/olm/account.rs
...
Co-authored-by: poljar <poljar@termina.org.uk >
2022-03-03 11:35:02 +01:00
Jonas Platte
2182ebdd16
ci: Fix toolchain installation job name inconsistencies
2022-03-03 11:10:30 +01:00
Jonas Platte
e575c27601
ci: Use uppercase for docs workflow / job name
2022-03-03 11:10:29 +01:00
Jonas Platte
439081e1db
ci: Move wasm and appservice into separate workflows
...
… to reduce the size of `ci.yml` and to allow more fine-grained retries.
2022-03-03 11:10:29 +01:00
Jonas Platte
1968ae60aa
ci: Fix inconsistencies in workflow yml formatting
2022-03-03 11:10:29 +01:00
Jonas Platte
b7a4ca4cff
Create an xtask crate for workspace task automation
...
Initially covering:
* Building docs
* Nightly CI jobs
2022-03-03 11:10:28 +01:00
Jonas Platte
b276087969
ci: Fail if rustdoc raises warnings
2022-03-03 11:10:13 +01:00
Jonas Platte
6e091dd5b8
ci: Use Swatinem/rust-cache@v1 instead of actions/cache@v2
...
Simplifies the cache configuration and could also improve build times by
disabling incremental compilation and potentially caching fewer things
or using a better cache key.
2022-03-03 11:04:07 +01:00
Jonas Platte
ea5478c61c
Merge pull request #510 from matrix-org/jplatte/up-ruma
2022-03-03 09:29:26 +01:00
Jonas Platte
1f2fd380b2
Upgrade Ruma to 0.5.0
2022-03-03 08:59:44 +01:00
Jonas Platte
012954e7f4
ci: Remove --all flag from cargo fmt arguments
...
It is only relevant for non-workspace path dependencies.
2022-03-02 14:34:22 +01:00
Jonas Platte
bc0c8d529e
Simplify Cargo workspace configuration
2022-03-02 14:34:22 +01:00
Jonas Platte
ba3ccc7d3d
Remove explicit 'static lifetimes from constants
2022-03-02 14:34:22 +01:00
Jonas Platte
b3f6d1cf63
Fix inconsistent indentation
2022-03-02 14:32:37 +01:00
Jonas Platte
af0375ca99
Remove unnecessary serialize / deserialize roundtrips
2022-03-02 14:26:49 +01:00
Jonas Platte
a1a0ae62ba
base: Use Option::get_or_insert_with to get rid of an unwrap() call
2022-03-02 14:26:48 +01:00
Damir Jelić
dec4772740
Merge branch 'gnunicorn-limited-ci-runs'
2022-03-02 14:21:54 +01:00
Benjamin Kampmann
85dd7a03e2
fix(MemoryStore): undeadlock timeline saving
...
Merge pull request #509 from matrix-org/gnunicorn/issue508
2022-03-02 13:44:47 +01:00
Benjamin Kampmann
cf674b6a46
Update crates/matrix-sdk-base/src/store/memory_store.rs
2022-03-02 13:14:38 +01:00
Benjamin Kampmann
102f960d25
chore(ci): limit CI to pull-requests & push main
...
Running CI on every push means running it twice for any PR as well as commit on branches that aren't PRs. This limits the CI run to pull-requests against main and pushes to main directly, removing unnecessary workload for the CI and making PRs CI faster.
2022-03-02 13:01:18 +01:00
Benjamin Kampmann
7e2e43c51c
Addressing review
...
Co-authored-by: Jonas Platte <jplatte+git@posteo.de >
2022-03-02 12:34:04 +01:00
Benjamin Kampmann
161d79eaa1
fixing typo
2022-03-02 12:22:47 +01:00
Benjamin Kampmann
eacffb5126
creating better tests, ensure sled and memory store act consistently
2022-03-02 12:13:07 +01:00
Benjamin Kampmann
40fa17f5b7
fixing timeline test
2022-03-02 08:36:10 +01:00
Benjamin Kampmann
9eee50da66
fixing clippy warnings
2022-03-01 15:32:23 +01:00
Benjamin Kampmann
2b9bb422cf
fix(MemoryStore): undeadlock timeline saving
2022-03-01 14:39:27 +01:00
Benjamin Kampmann
ca18fca20b
make Sled store benchmarks use SledStore again
2022-03-01 11:52:52 +01:00
Benjamin Kampmann
33be17d5d0
review requests
2022-03-01 11:52:38 +01:00
Benjamin Kampmann
c2bb1b9ad1
remove unneded braces in ci
2022-03-01 11:20:04 +01:00
Damir Jelić
70490277eb
fix(sdk): Use a short request retry for login/register/get_version methods
2022-02-28 15:26:30 +01:00
Damir Jelić
48fff04ffd
Merge branch 'enable_ruma_unstable_pre_spec'
2022-02-28 14:20:52 +01:00
Manuel Schmidbauer
6bf7b212cf
Changed register to really use short_retry()
2022-02-26 15:19:38 +01:00
Manuel Schmidbauer
01e080842a
Implemented short_retry for intial methods
...
Implemented RequestConfig::short_retry()
Changed few client methods to use it
Adjusted and added tests for it
2022-02-26 15:13:04 +01:00
Benjamin Kampmann
25e98db5aa
missing .to_string
2022-02-25 17:24:50 +01:00
Benjamin Kampmann
fce78ea84e
fixing style
2022-02-25 17:16:19 +01:00
Benjamin Kampmann
e414c88347
fixing integration test example
2022-02-25 17:14:45 +01:00
Benjamin Kampmann
56b3b2cec6
minor fix in ci
2022-02-25 16:11:32 +01:00
Benjamin Kampmann
13c39dbeab
fixing crypto bench
2022-02-25 15:53:36 +01:00
Benjamin Kampmann
5e05411036
fixing typos
2022-02-25 15:40:35 +01:00
Benjamin Kampmann
a6514b0cff
indexeddb formatting
2022-02-25 15:32:59 +01:00
Benjamin Kampmann
2e9ca5642a
more clippy for indexeddb
2022-02-25 15:31:39 +01:00
Benjamin Kampmann
06c9b1abe3
fixing proepr cargo build call
2022-02-25 15:23:04 +01:00
Benjamin Kampmann
c97f7e9ed0
clippy
2022-02-25 15:19:57 +01:00
Benjamin Kampmann
e1f898e6a5
fixing clippy and docs for base and crypto
2022-02-25 13:05:48 +01:00
Benjamin Kampmann
75953d6022
fixing machine doc builds
2022-02-24 17:29:08 +01:00
Benjamin Kampmann
6c90af1bd7
fixing indexeddb test
2022-02-24 17:16:10 +01:00
Benjamin Kampmann
8706ab68f8
fixing formatting
2022-02-24 16:57:39 +01:00
Benjamin Kampmann
9386e9df51
fixing name path
2022-02-24 16:56:14 +01:00
Benjamin Kampmann
418fac8574
fixing missing import for tests
2022-02-24 16:56:06 +01:00
Benjamin Kampmann
4c1e3ac03a
fix missing import
2022-02-24 16:50:57 +01:00
Benjamin Kampmann
4d6d13b9c8
fixing some clippies and wrong package naming
2022-02-24 15:40:24 +01:00
Benjamin Kampmann
cccad6104c
fixing formatting
2022-02-24 15:18:16 +01:00
Benjamin Kampmann
259ba3b794
refactor CI tests
2022-02-24 15:14:54 +01:00
Benjamin Kampmann
9c5cb08ac0
fixing crypto testing problems
2022-02-24 15:14:42 +01:00
Benjamin Kampmann
d7f30167a0
moving safe encode, making regular build work again
2022-02-24 13:02:35 +01:00
Benjamin Kampmann
e20bdfa2b5
cleaning up more cryptocrate
2022-02-23 21:33:31 +01:00
Benjamin Kampmann
12cf187e51
indexeddb store and passphrase opening
2022-02-23 21:07:39 +01:00
Benjamin Kampmann
ed0974eba3
re-integrate sled and indexeddb stores into base
2022-02-23 19:38:35 +01:00
Benjamin Kampmann
692f9d893a
chore(CI): also skip docs making on draft PRs
2022-02-23 16:07:16 +01:00
Benjamin Kampmann
21887877da
chore(CI): limit CI runs to non-draft PRs and manual dispatching
2022-02-23 16:04:05 +01:00
Julian Sparber
0dd623970b
Enable 'unstable-pre-spec' ruma feature
2022-02-23 15:52:19 +01:00
Benjamin Kampmann
73227623e6
one more fmt
2022-02-23 15:46:44 +01:00
Benjamin Kampmann
eeea757719
clippy and formatting
2022-02-23 15:44:36 +01:00
Benjamin Kampmann
f6a3c765e9
Merge remote-tracking branch 'origin/main' into ben-splitting-out-store-impls
2022-02-23 15:33:38 +01:00
Benjamin Kampmann
8414718371
feat(StateStore): Adding forward and backwards streams for room timelines
...
Merge pull request #486 from jsparber/timeline_stream
2022-02-23 14:38:14 +01:00
Benjamin Kampmann
78af96dab3
Clippy and Cargo fmt
2022-02-23 12:50:57 +01:00
Benjamin Kampmann
2598001c8f
room version simplification
2022-02-23 12:40:37 +01:00
Benjamin Kampmann
c22b4fcfb2
minor refactor for simplicity
2022-02-23 12:37:10 +01:00
Damir Jelić
2b20055eb5
Merge branch 'test-refactor'
2022-02-23 10:30:23 +01:00
Damir Jelić
e846fedc3f
feat(sdk): Support logging in using SSO with an identity provider
2022-02-23 10:27:07 +01:00
Julian Sparber
980076fd73
Merge remote-tracking branch 'origin/main' into timeline_stream
2022-02-22 17:30:51 +01:00
Julian Sparber
3378d18ca8
store: Add comment why we can ignore unexpected TimelineSlices
2022-02-22 16:49:42 +01:00
Julian Sparber
70e826ff25
Fix style issue
2022-02-22 15:48:56 +01:00
Julian Sparber
890a8675c9
store: Use BoxStream type without explicit lifetime
2022-02-22 15:43:26 +01:00
Julian Sparber
7627c142c4
Add method to optain timeline stream in one direction
2022-02-22 15:42:39 +01:00
Julian Sparber
84c46affa3
Fix example for Room::Common::timeline()
2022-02-22 12:51:44 +01:00
Benjamin Kampmann
5b1746e451
Merge pull request #503 from ShadowJonathan/labs-folder
...
Add `labs/` folder
2022-02-22 12:01:47 +01:00
Julian Sparber
d7592cce29
Merge remote-tracking branch 'origin/main' into timeline_stream
2022-02-22 11:47:17 +01:00
Julian Sparber
088086715f
store: Save timeline to IndexedDbStore
2022-02-22 11:43:12 +01:00
Jonathan de Jong
7c9d139031
Apply suggestions from code review
...
Co-authored-by: Benjamin Kampmann <ben.kampmann@gmail.com >
2022-02-21 22:08:41 +01:00
Jonathan de Jong
28ac6f9f52
add labs folder
2022-02-21 21:37:56 +01:00
Jonas Platte
b39a72ceac
matrix-sdk-test: Stop relying on event enum Serialize impls
...
In the latest version of Ruma, the event enums no longer implement
`Serialize` because it was somewhat of a footgun when custom /
unrecognized events were involved.
2022-02-21 14:50:41 +01:00
Benjamin Kampmann
6aeb382706
move state inspector for sled store into corresponding crate
2022-02-21 12:08:45 +01:00
Benjamin Kampmann
87cd9a3afc
clean up base
2022-02-18 20:41:42 +01:00
Benjamin Kampmann
95384f0f33
make encryption in new crates optional
2022-02-18 18:50:35 +01:00
Benjamin Kampmann
00ea5d9cad
moving sled cryptostore, too
2022-02-18 18:46:59 +01:00
Benjamin Kampmann
1563ecdf1a
Merge pull request #499 from matrix-org/ben-docs-for-custom-http-client
...
Minor improvements on ClientConfig
2022-02-17 20:37:47 +01:00
Benjamin Kampmann
7ab8872dd5
fix(Version): removing (crate only) VERSION const
2022-02-17 19:25:09 +01:00
Benjamin Kampmann
5d812d4aa7
fixing style
2022-02-17 19:09:10 +01:00
Benjamin Kampmann
0ca6ec1377
moving sled state store into separate crate
2022-02-17 19:02:17 +01:00
Benjamin Kampmann
1d0d32858b
fix(ClientConfig): Do not expose crate version in user agent anymore
2022-02-17 18:53:32 +01:00
Julian Sparber
8e80e02a78
Add test for matrix_sdk::room::Common::timeline()
...
The test is only run when the `sled_state_store` feature is enabled.
This also changes the test_json::MORE_SYNC and test_json::MORE_SYNC_2 to
not responsed with a limited timeline.
2022-02-17 18:32:44 +01:00
Julian Sparber
9e7bee89c8
Add test for timeline cache
2022-02-17 18:32:44 +01:00
Julian Sparber
fb3edeb206
store: Save timeline to MemoryStore
2022-02-17 18:32:36 +01:00
Julian Sparber
516aa26589
store: Save timeline to SledStore
...
This writes slices from StateChanges::timeline to the SledStore.
The cache is removed when ever a limited sync response is received or
when an event already known to the store is received.
Stored events are redacted when a redaction event is received.
2022-02-17 16:15:17 +01:00
Julian Sparber
7d19e9aa34
test: Add mocked responses need for timeline storage
2022-02-17 16:15:17 +01:00
Julian Sparber
64c49cd137
Add stream to obtain the timeline of a room
2022-02-17 16:15:17 +01:00
Julian Sparber
c5950ac929
common: add TimelineSlice
...
The TimelineSlice is a slice of the timeline of a room and contains the
start and end of the slice.
2022-02-17 16:13:04 +01:00
Benjamin Kampmann
ea92bc676c
Merge remote-tracking branch 'origin/main' into ben-splitting-out-store-impls
2022-02-17 16:03:07 +01:00
Benjamin Kampmann
839136118f
fixing style
2022-02-17 13:06:44 +01:00
Benjamin Kampmann
6751413673
Merge remote-tracking branch 'origin/main' into ben-docs-for-custom-http-client
2022-02-17 13:01:57 +01:00
Benjamin Kampmann
094fb176b6
chore: remove unused lifetime found by clippy
2022-02-17 12:13:56 +01:00
Benjamin Kampmann
75f45c8df6
chore: Update clippy, removes deprecations to make clippy happy
2022-02-17 12:12:19 +01:00
Benjamin Kampmann
e9e0ba216b
chore: fixing formatting
2022-02-17 11:49:49 +01:00
Benjamin Kampmann
bbc92d912f
docs(ClientConfig): Add example for customn reqwest::ClientBuilder
2022-02-17 11:43:20 +01:00
Benjamin Kampmann
81e90c5699
chore(ClientConfig): Simplify user agent storing
2022-02-17 11:40:59 +01:00
Benjamin Kampmann
54303a03bf
feat(sdk): Move Account related functions from Client into a new separated Account struct
...
Create Account struct
2022-02-16 19:51:16 +01:00
Benjamin Kampmann
78ea330d3a
Merge remote-tracking branch 'origin/main' into pr/zecakeh/487
2022-02-16 18:30:24 +01:00
Benjamin Kampmann
93c46280ab
feat(sdk): Add method to get homeserver capabilities
...
Merge pull request #495 from zecakeh/capabilities
2022-02-16 18:27:04 +01:00
JCWasmx86
c119d71d8b
Added support for logging in with specific SSO-Provider
2022-02-16 16:46:08 +01:00
Pass Automated Testing Suite
1e0a240701
feat(sdk): Support to autogenerate thumbnails for image attachments
2022-02-16 16:04:46 +01:00
Kévin Commaille
2f7d271c16
fix(sdk): Add license to attachment.rs
2022-02-15 19:15:06 +01:00
Kévin Commaille
9e545c34ba
fix(sdk): Fix clippy warning
2022-02-15 19:00:39 +01:00
Kévin Commaille
69b0b04e70
fix(sdk): Add ruma feature for blurhash support
2022-02-15 18:43:56 +01:00
Kévin Commaille
de8aa7b4f7
fix(sdk): Simplify code in room::Joined::send_attachment
2022-02-15 18:15:59 +01:00
Kévin Commaille
ebd913f50f
fix(sdk): Fix dead links in AttachmentConfig docs
2022-02-15 18:15:59 +01:00
Kévin Commaille
409afc6684
feat(sdk): Create AttachmentConfig struct
2022-02-15 18:15:59 +01:00
Kévin Commaille
c2c9d5ecc0
fix(sdk): Enable image_proc with image_rayon
2022-02-15 18:15:59 +01:00
Kévin Commaille
e926d7e928
chore: Update image dependency
2022-02-15 18:15:59 +01:00
Kévin Commaille
78489391d2
feat(sdk): Add method to send attachments with generated thumbnails
2022-02-15 18:15:59 +01:00
Kévin Commaille
5dc7dfd4c8
feat(sdk): Add method to generate thumbnails from images
2022-02-15 18:15:58 +01:00
Kévin Commaille
0436780292
feat(sdk): Allow to add info and thumbnail to attachments
2022-02-15 18:15:58 +01:00
Kévin Commaille
6389749931
fix(sdk): Return whole responses in Account
2022-02-15 18:15:05 +01:00
Kévin Commaille
abed1e2986
fix(sdk): Fix Account docs
...
Add a license and fix the dead links.
2022-02-15 18:15:05 +01:00
Kévin Commaille
9449b3ef23
feat(sdk): Add more methods to Account
...
- get_profile
- change_password
- deactivate
- get_3pids
- request_3pid_email_token
- request_3pid_msisdn_token
- add_3pid
- delete_3pid
2022-02-15 18:15:05 +01:00
Kévin Commaille
30d3cafa0c
feat(sdk): Make upload_avatar return an MXC URI
2022-02-15 18:15:05 +01:00
Kévin Commaille
467005b603
feat(sdk): Move account-related methods to Account struct
...
Methods moved from Client to Account:
- display_name renamed to get_display_name
- set_display_name
- avatar_url renamed to get_avatar_url
- set_avatar_url
- avatar renamed to get_avatar
- upload_avatar
2022-02-15 18:15:05 +01:00
Kévin Commaille
c67d5afaf4
feat(sdk): Add method to get homeserver capabilities
2022-02-15 17:42:12 +01:00
Benjamin Kampmann
393cfb1851
move indexeddb cryptostore into new crate
2022-02-15 15:09:31 +01:00
Damir Jelić
a4ccbf0386
Merge branch 'up-ruma'
2022-02-15 14:46:18 +01:00
Damir Jelić
f220f2e743
fix(crypto): Remove an unused lifetime
2022-02-15 12:32:53 +01:00
Benjamin Kampmann
5cae4e08af
making tests pass again
2022-02-14 17:38:58 +01:00
Benjamin Kampmann
e928d02c6f
Move indexeddb out into a separate crate
2022-02-14 17:00:55 +01:00
Benjamin Kampmann
95e06ec732
Merge pull request #492 from zecakeh/fix-docs
...
fix(doc): Build nightly docs with correct features
2022-02-14 12:03:21 +01:00
Kévin Commaille
0570cd9439
fix(doc): Build nightly docs with correct features
2022-02-13 10:22:05 +01:00
Jonas Platte
c3d9c73d00
Make identifier parsing easier to read
...
… by using `Id::parse` instead of `Box::<Id>::try_from`.
2022-02-12 04:20:37 +01:00
Jonas Platte
a7dcd26588
Remove unused variable from test
2022-02-12 04:15:50 +01:00
Jonas Platte
735d9e5894
Use user_id! macro in more tests
2022-02-12 04:15:48 +01:00
Jonas Platte
8e41bccf8b
Upgrade Ruma
2022-02-11 20:45:22 +01:00
Daniel García Moreno
4b5aae1123
Do not fail when no session if force_auth
...
It looks like the force_auth is working correctly when restoring the
session, but it's not working with the call to client.login, so it
cannot be used.
The access_token is not available in the login query, so if the option
force_auth is set, this call will fail always. This patch just ignores
the force_auth if there's no session, so any query will work when
force_auth is true.
Fix https://github.com/matrix-org/matrix-rust-sdk/issues/488
2022-02-11 15:22:39 +01:00
Benjamin Kampmann
8538bdcce2
fix[state store]: Persist stripped rooms in the right bucket
...
fixes #467 as well as persistence problems with the indexeddb store
2022-02-07 11:53:31 +01:00
Benjamin Kampmann
7aa99448c3
fix style
2022-02-04 18:02:00 +01:00
Benjamin Kampmann
29c851f463
fixing indexeddb store
2022-02-04 18:01:37 +01:00
Benjamin Kampmann
d20abe05ed
lookup sync-token in proper bucket
2022-02-04 17:47:01 +01:00
Benjamin Kampmann
560ef86747
fixing style
2022-02-04 14:20:51 +01:00
Benjamin Kampmann
e68c75451e
fixing failing test and naming convention
2022-02-04 14:18:26 +01:00
Benjamin Kampmann
355bb0a091
fixing style
2022-02-04 12:21:31 +01:00
Benjamin Kampmann
2a8c6dabaf
Re-add population test
2022-02-04 12:20:10 +01:00
Benjamin Kampmann
772a585b80
stick to naming convention, clarify name
2022-02-04 12:10:53 +01:00
Benjamin Kampmann
51bf07fc34
fixing #467
2022-02-04 12:10:22 +01:00
Erik Johnston
59d21d9683
Replace uses of Vec::drain(..) with into_iter
...
`drain` is designed to be used when you want to reuse the `Vec` or only
move out a subset range. Using `.into_iter()` is more efficient and
idiomatic, and can be dropped entirely when used in `for` loops.
2022-02-03 14:43:14 +00:00
Benjamin Kampmann
1286357bcf
Merge pull request #414 from gnunicorn/ben-wasm-store
...
IndexedDB support for wasm/browser environments
2022-02-03 09:14:54 +01:00
Benjamin Kampmann
fa60881e2d
disable broken test
2022-02-02 20:34:52 +01:00
Benjamin Kampmann
990b897e94
switch tokio:test to async_test
2022-02-02 15:10:24 +01:00
Benjamin Kampmann
64709f1d6b
fixing style
2022-02-02 14:54:29 +01:00
Benjamin Kampmann
b8d93d0179
implementing room removal for indexeddb
2022-02-02 14:53:21 +01:00
Benjamin Kampmann
666bec48bc
fixing indexeddb types merge
2022-02-02 14:25:34 +01:00
Benjamin Kampmann
7e008d00e4
fixing linux tests
2022-02-02 14:10:04 +01:00
Benjamin Kampmann
c07c284c5e
fixing docs for await
2022-02-02 14:03:07 +01:00
Benjamin Kampmann
b4d5ad95cf
fixing style
2022-02-02 13:15:54 +01:00
Benjamin Kampmann
ea959a17e2
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2022-02-02 13:05:52 +01:00
Benjamin Kampmann
e2c6dc33fb
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2022-02-02 12:16:49 +01:00
Damir Jelić
261772c4e2
chore: Upgrade our deps
2022-02-02 10:27:03 +01:00
Damir Jelić
27eed9d9bd
refactor(matrix-sdk): Use the ruma cancel code for mismatched sas
2022-02-01 16:10:06 +01:00
Jonas Platte
8a97936228
Fix one more clippy warning
2022-02-01 15:44:22 +01:00
Jonas Platte
0df1f6007b
Silence invalid clippy warnings
2022-02-01 15:44:16 +01:00
Benjamin Kampmann
8270304485
Fix build warnings and clippy lints
2022-02-01 15:30:09 +01:00
Benjamin Kampmann
93c75c1e4d
fixing build warnings and clippy lints
2022-02-01 15:09:58 +01:00
Jonas Platte
2f67b62509
Unbreak wasm_command_bot compilation
2022-02-01 15:08:02 +01:00
Jonas Platte
74172dac32
Activate ruma's rand feature unconditionally in matrix-sdk, matrix-sdk-crypto
...
… because it is required for `TransactionId::new()`.
2022-02-01 15:08:02 +01:00
Jonas Platte
96d9fd80eb
Silence new clippy lint occurrence
2022-02-01 15:08:02 +01:00
Jonas Platte
8dec390258
Upgrade Ruma
2022-02-01 15:08:01 +01:00
Jonas Platte
6baffc4b0b
Refactor EncodeKey implementations
2022-02-01 15:05:10 +01:00
Jonas Platte
c6594edc92
Use faster sorting algorithm
...
… because Clippy complained.
2022-02-01 15:05:10 +01:00
Jonas Platte
80e8d4fbd5
Remove unnecessary copying
2022-02-01 15:05:10 +01:00
Jonas Platte
aa4a31d81b
crypto: Refactor some test code
2022-02-01 15:05:10 +01:00
Jonas Platte
df93cfde8b
Remove unnecessary Result from private function return type
2022-02-01 15:05:10 +01:00
Jonas Platte
f56f27a2e1
Remove unnecessary parentheses
2022-02-01 15:05:10 +01:00
Jonas Platte
3e496dba50
Remove unnecessary .iter() calls
2022-02-01 15:05:10 +01:00
Damir Jelić
b55362a35b
Merge branch 'forget'
2022-02-01 14:36:23 +01:00
Damir Jelić
88b64950dc
Merge branch 'not_match_sas'
2022-02-01 14:05:54 +01:00
Benjamin Kampmann
a0f2e38b89
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2022-02-01 14:04:26 +01:00
Damir Jelić
fe2323cd33
Merge branch 'doc-store-path-feature'
2022-02-01 13:53:31 +01:00
Damir Jelić
d09792e402
docs(matrix-sdk): Clarify that an in-memory store will be used
2022-02-01 13:47:16 +01:00
Damir Jelić
ac7f2c94fb
Merge branch 'fix-verification-done-wait'
2022-02-01 13:43:58 +01:00
Damir Jelić
906dcfe423
Merge branch 'messages-param'
2022-02-01 12:34:40 +01:00
Damir Jelić
b5ce7e7bd0
Merge branch 'tags'
2022-02-01 12:01:17 +01:00
Damir Jelić
c9c03fd9b1
Merge branch 'encrypt-custom-events'
2022-02-01 11:48:31 +01:00
Julian Sparber
960c90cdff
Add method to mismatch SAS verifications
...
The method sets the proper CancelCode for the case when SAS doesn't
match on both devices.
2022-01-13 10:26:53 +01:00
Kévin Commaille
e1d78c01f0
test(base): Add store test for room removal
2022-01-12 18:41:26 +01:00
Kévin Commaille
76d1b6e4d2
test(base): Add test to populate a store
2022-01-12 18:40:57 +01:00
Kévin Commaille
94e5ee71c7
fix(sdk): Remove a room from the store on forget
2022-01-12 16:53:47 +01:00
Kévin Commaille
d455b0d318
test(base): Use common data for store tests
2022-01-12 16:42:04 +01:00
Kévin Commaille
535d1ec30f
feat(sdk): Use TagName in set/remove tag methods
2022-01-11 12:25:27 +01:00
Kévin Commaille
52deff1db2
fix(sdk): Move set/remove tag methods to room::Common
2022-01-11 12:24:46 +01:00
Jonas Platte
4603ee136d
Remove unnecessary string copies
2022-01-10 16:30:45 +01:00
Jonas Platte
da657b8643
Allow custom events in OlmMachine::encrypt
2022-01-10 16:29:49 +01:00
Jonas Platte
c2888e56a4
Use a custom options type for room::Common::messages
...
With the previous API, one would have to supply the room's ID manually,
despite the method already being called on a room.
2022-01-09 01:54:38 +01:00
Benjamin Kampmann
92044cedb9
fixing style again
2022-01-07 12:03:19 +01:00
Benjamin Kampmann
fb81ebf301
fixing style again
2022-01-07 12:00:12 +01:00
Benjamin Kampmann
278d934973
fix broken merge
2022-01-07 11:49:51 +01:00
Benjamin Kampmann
0937c2e6f6
[fix ci] remove unused import
2022-01-07 10:46:46 +01:00
Benjamin Kampmann
e1ad8fe8e0
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2022-01-07 10:42:52 +01:00
Antoine Martin
27f2cd3db0
docs(sdk): document features needed for store_path
...
If default features `sled_state_store` and `sled_cryptostore` aren't
enabled, then passing a store path to the Client does nothing.
2022-01-06 16:09:24 +01:00
Amanda Graven
038adea6d7
appservice: Examples for query handler registry fns
...
Add examples for functions for registering handlers for room and user
queries. Also remove a needless mut requirement for these functions.
2022-01-05 14:33:46 +01:00
ftilde
b1501fcb1d
Add test for verification started from a request
2022-01-04 21:27:06 +01:00
ftilde
b877d15616
Do not send Done message after receiving a Done
...
Done messages are supposed to indicate that the verification was
successful and _can be_ finalized. The correct time to send Done events
is after the user has confirmed the verification (after checking the
emoji or similar) and after receiving and checking a mac from the other
party (whatever happens later). Waiting for the other side to send Done
before sending it ourselves does not make sense.
2022-01-04 21:27:06 +01:00
ftilde
1c72472706
Send Done message when confirming in MacReceived state
...
Being in MacReceived state means that the other party has confirmed that
emojis/numbers match and the sent mac messages has been successfully
checked. When now confirming ourselves this means that the verification
was successful and thus the Done message can be sent to the other party.
2022-01-04 21:27:06 +01:00
ftilde
0e4057f3a3
Do not drop requests after receiving mac if sas is not complete
...
When during verification we are the first party to complete the
verification workflow and then receive a (correct) MAC from the other
party, we need to send out the Done message even if we have not received
the Done message from the other party ourselves and are thus still
"WaitingForDone".
2022-01-04 21:27:06 +01:00
Damir Jelić
c79e62d80e
Merge branch 'fix-verification-double-start'
2022-01-04 14:59:52 +01:00
ftilde
f4249c591a
Return RoomEvents from decryption methods
...
Previously, these methods returned `SyncRoomEvent`s instead, even though
the decrypted events are required to contain a room_id field (in order
for the server to not to be able to change these). As a side effect,
glue code which adds a room_id to the `SyncRoomEvent` to convert it to a
`RoomEvent` is be removed in some places.
When a `SyncRoomEvent` is required (such as in code handling sync
responses), the `From` implementation of `SyncRoomEvent` can be used.
2022-01-03 22:48:51 +01:00
ftilde
37cadc7c29
Add From<RoomEvent> for SyncRoomEvent
...
Since SyncRoomEvents are just RoomEvents without a room_id, it is safe
to just discard the information that this field exists in the underlying
json.
2022-01-03 22:48:30 +01:00
ftilde
a1cf8b613d
Drop start requests from lower precedence parties if sas has already been started.
...
According to the guide for implementing verification started from
a verification request, both parties should (or at least allowed to)
send a start request when the verification is ready. However, only the
start request from the party with lexicographically smaller user id (or
device id, for device verification, and thus equal user id) is supposed
to be accepted, and the other one ignored.
2022-01-03 21:04:07 +01:00
ftilde
798464b68e
Verification: Handle Accept after Start on both sides
...
Previously, when a sas-workflow was started by the other party (e.g.
from a verification request), but the own start request was answered with
an "accept" this accept would be ignored. However, this is incorrect
since the official guide on implementing verification actually states
that both parties are expected to send start-requests, where of those
only one request is actually accepted (depending on user id and possibly
the device id).
2022-01-03 21:02:53 +01:00
ftilde
87de0b5883
Return broken messages unchanged from messages()
...
Without this change, a batch with a message that cannot be deserialized
(for whatever reason) means that the batch cannot be processed at all by
the caller. Now, those messages are returned unchanged in the batch so
that the caller can handle them.
2022-01-03 19:49:19 +01:00
Damir Jelić
5003ed1493
docs: Enable all features for some of our crates when building docs
2022-01-03 13:14:36 +01:00
Damir Jelić
f12f03b8da
docs: Switch to the doc_auto_cfg feature
2022-01-03 12:33:24 +01:00
Damir Jelić
9856270e75
fix(crypto): Don't enable the backup feature by default
2022-01-03 12:27:03 +01:00
Damir Jelić
c22fa4e3fd
fix(base): Fix a new clippy warning
2022-01-03 10:23:38 +01:00
Julien Merzoug
f7f30f1636
docs(sdk): Fix a typo
2022-01-03 13:05:35 +08:00
Damir Jelić
ae9a554808
Merge branch 'supported-versions'
2021-12-31 14:00:11 +01:00
Kévin Commaille
5ecd74b2e4
feat(sdk): Make get_supported_versions public
2021-12-31 13:02:15 +01:00
Damir Jelić
dd29e2087c
Merge branch 'common-fixes'
2021-12-31 12:54:49 +01:00
Jonas Platte
99ce9419aa
Fix futures-util dependency
...
Turn on alloc feature that is required for `future::join_all`.
2021-12-31 11:00:51 +01:00
Kévin Commaille
0d771565f9
feat(sdk): Simplify the API of Common::event
2021-12-31 02:34:16 +01:00
Kévin Commaille
c35f8c55ac
fix(sdk): Fix docs of Common::active_members_no_sync
2021-12-31 02:16:20 +01:00
ftilde
703e965172
Decrypt messages from room::Common::messages()
...
Due to additional error possibilities and encryption info for messages,
the return type of the method was changed accordingly and a wrapper
struct `Messages` was introduced.
2021-12-29 15:26:45 +01:00
ftilde
046bfa9dad
Fix typo in comment
2021-12-29 15:26:39 +01:00
Damir Jelić
035d319122
Merge branch 'travis/misc'
2021-12-28 11:52:23 +01:00
Damir Jelić
81b730d8c3
Merge branch 'request-config-expose-force_auth'
2021-12-28 11:31:08 +01:00
Damir Jelić
6170be95e1
Merge branch 'membership'
2021-12-28 10:59:34 +01:00
Benjamin Kampmann
34687733e5
create sync token store
2021-12-27 23:54:51 +01:00
Benjamin Kampmann
8ce622d11e
fixin style
2021-12-27 23:37:45 +01:00
Benjamin Kampmann
9ff4609f3d
testing emcc versions
2021-12-27 23:35:21 +01:00
Benjamin Kampmann
15cdaead50
fix broken now call
2021-12-27 23:27:11 +01:00
Benjamin Kampmann
3cde28a438
trying older emscripten
2021-12-27 21:37:37 +01:00
Jonas Platte
d92d7771d9
Add must_use attribute to config constructors and methods
...
These all don't have side effects so discarding the result wouldn't make
sense.
2021-12-27 17:21:21 +01:00
Jonas Platte
f6d7933601
Simplify filter closure
2021-12-27 14:56:31 +01:00
Jonas Platte
abf525390e
Fix clippy warning (remove unnecessary clone)
2021-12-27 14:56:19 +01:00
Jonas Platte
fea80843eb
Remove redundant calls to .into_iter()
2021-12-27 14:21:46 +01:00
Jonas Platte
1a7baf631e
Avoid enormous type name in GroupSessionManager::encrypt_session_for
2021-12-27 14:20:16 +01:00
Benjamin Kampmann
cbd4aa0a37
disable test failing on macosx
2021-12-22 13:58:54 +01:00
Benjamin Kampmann
98beff4455
resolve clippy complaints
2021-12-22 12:36:07 +01:00
Benjamin Kampmann
574893368b
refine wasm tests
2021-12-22 12:32:59 +01:00
Benjamin Kampmann
1f5a084ccf
don't fail fast
2021-12-22 11:38:52 +01:00
Benjamin Kampmann
8dda7ea8fa
please consider all includes
2021-12-22 11:19:39 +01:00
Benjamin Kampmann
e619cc1eb7
don't combine
2021-12-22 10:59:17 +01:00
Benjamin Kampmann
1a206ff36c
let them all run out
2021-12-16 18:46:00 +01:00
Benjamin Kampmann
afe7d055a1
[ci] fix syntax
2021-12-16 18:24:31 +01:00
Benjamin Kampmann
9d4d8667ff
latest and node
2021-12-16 17:14:03 +01:00
Benjamin Kampmann
8feab722f8
[CI] dynamic node version
2021-12-16 11:35:24 +01:00
Benjamin Kampmann
7ad5bc7dee
version listing
2021-12-16 11:15:10 +01:00
Benjamin Kampmann
71bc043d19
extended testing for wasm example
2021-12-16 10:52:15 +01:00
Travis Ralston
171c334cb1
Add .idea directory to gitignore
2021-12-14 18:59:23 -07:00
Benjamin Kampmann
4f93e739f5
fixing typo
2021-12-13 23:25:26 +01:00
Benjamin Kampmann
fa00cba8bb
fixing style
2021-12-13 22:37:12 +01:00
Benjamin Kampmann
678527e1e6
libolm is fixed, so should our code be
2021-12-13 22:35:56 +01:00
Benjamin Kampmann
7fc040d86c
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2021-12-13 22:34:33 +01:00
Marc 'risson' Schmitt
ba05dd5b8c
feat(RequestConfig): expose force_auth setting
...
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space >
2021-12-13 20:45:51 +01:00
Kévin Commaille
b697bcb4fd
feat(base): Add RoomMember::membership accessor
2021-12-13 16:20:46 +01:00
Benjamin Kampmann
2982741dd1
minor style fix
2021-12-10 16:32:09 +01:00
Benjamin Kampmann
3f9b5511d1
activate IdbKeyRange feature on web-sys dependency
2021-12-10 14:02:02 +01:00
Benjamin Kampmann
35f2a004e1
style and docs fixes
2021-12-10 13:58:02 +01:00
Benjamin Kampmann
e02407ef37
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2021-12-10 13:30:46 +01:00
Benjamin Kampmann
bf9ad7a5c0
fix typo
2021-12-10 13:28:28 +01:00
Benjamin Kampmann
186bd975c1
reuse SafeEncode for indexeddb_cryptostore
2021-12-10 13:28:16 +01:00
Benjamin Kampmann
007b7e2403
outsource SafeEncode helper
2021-12-10 12:53:57 +01:00
Benjamin Kampmann
a6dbd6bcbb
escaped characters for indexeddb keys
2021-12-10 11:47:35 +01:00
Damir Jelić
009ead2eea
chore: Bump Ruma.
2021-12-08 16:50:25 +01:00
Benjamin Kampmann
3de6f60f90
remove unneccessary imports and compiler flags
2021-12-08 13:42:44 +01:00
Benjamin Kampmann
2ccb1d2813
don't pickle
2021-12-08 12:39:50 +01:00
Benjamin Kampmann
89523241fd
fixing main sdk wasm testing
2021-12-02 14:37:59 +01:00
Benjamin Kampmann
5734afc7ab
[CI] fixing test syntax
2021-12-02 12:45:29 +01:00
Benjamin Kampmann
4e18286c1c
remove another dependency
2021-12-01 23:53:07 +01:00
Benjamin Kampmann
10e27536ba
fix CI format
2021-12-01 23:51:22 +01:00
Benjamin Kampmann
9883ca0d84
[CI] parallel and the correct crates
2021-12-01 23:46:05 +01:00
Benjamin Kampmann
aab1fd2147
fixing ci job
2021-12-01 21:03:26 +01:00
Benjamin Kampmann
652ef6e160
sled store needs tokio
2021-12-01 20:48:27 +01:00
Benjamin Kampmann
53ad5810ef
typo fixes
2021-12-01 20:36:44 +01:00
Benjamin Kampmann
d0838d6784
fixing style
2021-12-01 20:34:27 +01:00
Benjamin Kampmann
1bbe38e376
compiling matrix-sdk for wasm
2021-12-01 20:32:26 +01:00
Benjamin Kampmann
d155f9a020
can work on wasm32
2021-12-01 20:06:25 +01:00
Benjamin Kampmann
7e6ac4222f
cleaning up store
2021-12-01 20:03:47 +01:00
Benjamin Kampmann
d0395906ab
activate available tests for wasm32
2021-12-01 19:32:34 +01:00
Benjamin Kampmann
ac2771b997
add docs
2021-12-01 19:00:06 +01:00
Benjamin Kampmann
470c81b8ad
be specific with dead_code
2021-12-01 18:58:22 +01:00
Benjamin Kampmann
f5485088a0
limit test execution to platforms that support it
2021-12-01 18:55:34 +01:00
Benjamin Kampmann
2ee7a95fc4
(now really) ensure Instant::now is working properly
2021-12-01 18:03:43 +01:00
Benjamin Kampmann
6b3f008b32
ensure Instant::now is working properly
2021-12-01 18:01:00 +01:00
Benjamin Kampmann
8ab5df490a
remove appservice, as it won't support wasm for a while
2021-12-01 15:39:41 +01:00
Benjamin Kampmann
787f8265d3
fixing CI
2021-12-01 15:15:26 +01:00
Benjamin Kampmann
293700ce69
checking all crates for wasm32
2021-12-01 14:53:21 +01:00
Damir Jelić
f97aed0e41
Merge branch 'MTRNord-wasm-fix'
2021-12-01 14:51:28 +01:00
Benjamin Kampmann
afaeae8e6b
unify indexeddb-features and improve example build
2021-12-01 12:57:09 +01:00
Benjamin Kampmann
b150dea329
fix style
2021-12-01 11:58:22 +01:00
Benjamin Kampmann
4b12260af3
move store implementations into files
2021-12-01 11:56:33 +01:00
Benjamin Kampmann
9d5c1fc14c
move store tests into separate reusable macro, too
2021-12-01 11:52:29 +01:00
Benjamin Kampmann
c7a9fc6c8e
syntax fix
2021-12-01 11:48:30 +01:00
Benjamin Kampmann
a1b62a1f4b
allow helper to be unused
2021-11-30 19:21:16 +01:00
Benjamin Kampmann
1a20e62de7
remove trouble causing unnecessary ref-clone
2021-11-30 18:54:12 +01:00
Benjamin Kampmann
4fdada55b8
fixing typo
2021-11-30 18:50:50 +01:00
Benjamin Kampmann
c5e7ca0c5e
undo my olm-sys-hack
2021-11-30 18:45:40 +01:00
Benjamin Kampmann
97d675f216
fix formatting
2021-11-30 18:45:00 +01:00
Benjamin Kampmann
9a0cf2b507
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2021-11-30 18:43:20 +01:00
Benjamin Kampmann
9b7c1d7c4d
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2021-11-30 18:40:14 +01:00
Benjamin Kampmann
968f80cc1b
minor fix
2021-11-30 18:00:20 +01:00
Benjamin Kampmann
f185aa2eae
reuse cryptostore for sled
2021-11-30 17:58:14 +01:00
Jonas Platte
6519aaff4d
crypto: Fix docs for SledStore
2021-11-30 17:48:49 +01:00
Benjamin Kampmann
9f0fe18dfc
fix async_test for non-wasm32 envs
2021-11-30 17:46:50 +01:00
Benjamin Kampmann
954cce463e
make cryptostore tests reusable
2021-11-30 16:01:42 +01:00
Benjamin Kampmann
e3c62825b6
test and impl for outbound
2021-11-30 14:49:00 +01:00
Benjamin Kampmann
1e654acc29
backup and reset for inbound_groups
2021-11-30 13:20:49 +01:00
Benjamin Kampmann
59e3baf819
cover more inbound_group_session functions
2021-11-30 13:01:49 +01:00
Damir Jelić
8494f10583
Merge branch 'up-ruma'
2021-11-30 09:56:01 +01:00
Benjamin Kampmann
d509eaa959
implement tracked user
2021-11-29 21:23:01 +01:00
Benjamin Kampmann
85dde94dd5
implement sessions
2021-11-29 20:57:30 +01:00
Benjamin Kampmann
c9a10353f2
implement olm_hashes
2021-11-29 20:47:18 +01:00
Benjamin Kampmann
41faa59121
implement keyrequests
2021-11-29 19:43:20 +01:00
Benjamin Kampmann
833802677b
implement devices saving and deleting
2021-11-29 15:04:20 +01:00
Jonas Platte
5824cb649e
Update tests
2021-11-29 14:30:45 +01:00
Benjamin Kampmann
fe257effce
properly open encrypted state db
2021-11-29 14:05:48 +01:00
Benjamin Kampmann
47168ca3da
implement saving user
2021-11-29 14:05:22 +01:00
Jonas Platte
dfd59f42a9
Fix warp build error
2021-11-29 13:36:05 +01:00
Jonas Platte
557e038869
Minimal style improvements
2021-11-29 13:27:38 +01:00
Damir Jelić
a628e84b63
fix(crypto): Fix a copy paste error preventing us from verifying users
2021-11-29 09:31:05 +01:00
Jonas Platte
36db5e47dd
Upgrade Ruma
2021-11-26 19:22:54 +01:00
Damir Jelić
56d80b91c9
fix(sdk): Send the crypto requests out before a sync as well
2021-11-26 16:52:32 +01:00
Damir Jelić
b0f48c9660
fix(crypto): Let users fetch our own device out of the store
2021-11-26 16:52:31 +01:00
Damir Jelić
68a2020516
fix(crypto): Check if the device we get from the server matches our own
2021-11-26 16:26:40 +01:00
Damir Jelić
13db642143
fix(cyrpto): Log database upgrades using the debug log level
2021-11-26 16:26:40 +01:00
Damir Jelić
f2c344b39a
fix(crypto): Use the DeviceKeys as the inner type for a ReadOnlyDevice
2021-11-26 16:26:40 +01:00
Benjamin Kampmann
b42b04e887
account loading and saving
2021-11-26 14:36:14 +01:00
Benjamin Kampmann
229a81bfd6
Implement saving
2021-11-26 12:37:57 +01:00
Benjamin Kampmann
6d9920c239
various minor cleanups of unused imports
2021-11-25 16:44:20 +01:00
Damir Jelić
7b6132b71e
feat(crypto): Return the list of room keys we imported
...
Clients might want to retry decryption after they import room keys, for
this to be efficient they'll need to know which room keys got imported.
This patch extends the return value of the room key import result to
include the map of room keys that got imported.
2021-11-25 16:41:28 +01:00
Benjamin Kampmann
47dff21eda
update trait impl of indexeddb
2021-11-25 15:52:57 +01:00
Benjamin Kampmann
32a8ec7782
minor wasm32 fixes
2021-11-25 15:52:27 +01:00
Benjamin Kampmann
4c60db94a2
Implement helper for wasm32 MilliSecondsSinceUnixEpoch
2021-11-25 15:52:03 +01:00
Benjamin Kampmann
42680164ea
fix up CI test
2021-11-25 15:49:20 +01:00
Benjamin Kampmann
5cf56adce7
Adding result-signature support for wasm32 async-test-macro
2021-11-25 15:46:17 +01:00
Damir Jelić
10173b990d
fix(sdk): Degrade some logs that show user ids to the debug log level
2021-11-25 14:49:07 +01:00
Damir Jelić
fc74526699
fix(crypto): Add the ability to mark room keys as backed up when importing
2021-11-25 11:18:09 +01:00
Damir Jelić
55973b5bf1
fix(crypto): Make ExportedRoomKey deserialization laxer
...
Some clients might have skipped the serialization of an empty
sender_claimed_keys and the forwarding_curve25519_key_chain, while these
fields are required there's really no upside in requiring them if they
are empty.
So create defaults if they are missing.
2021-11-25 10:20:09 +01:00
Marcel
406aaa0b50
Make sure to also include the uuid create serde feature with wasm
2021-11-24 20:50:36 +01:00
Damir Jelić
33b198d505
fix(crypto): Make sure we remove the unsigned object before signing
2021-11-24 15:56:32 +01:00
Damir Jelić
be70d38e2a
fix(crypto): Use the from constructor for some maps with known values
2021-11-24 15:56:05 +01:00
Damir Jelić
1e70b4f804
fix(crypto): Automatically track your own user if the caller doesn't do so
...
Users of the crypto crate should mark all members that are part of an
E2EE room for tracking, this will of course mark your own user for
tracking.
If the crypto crate user doesn't have any E2EE rooms he may not add any
members to be tracked. The user might still want to inspect their own
E2EE devices and identities. This patch makes sure that our member is
tracked.
2021-11-24 15:21:50 +01:00
Benjamin Kampmann
4c0bbebb07
Merge remote-tracking branch 'upstream/main' into ben-wasm-store
2021-11-24 11:48:45 +01:00
Benjamin Kampmann
9835c4ad92
Update to webpack5
2021-11-24 11:00:52 +01:00
Damir Jelić
a49a7fe1f9
fix(crypto): Clear the master key signatures when we verify our own user
2021-11-22 18:00:52 +01:00
Damir Jelić
fa42373cf8
Merge branch 'client-arc'
2021-11-22 16:27:27 +01:00
Damir Jelić
a8c36b4041
Merge branch 'fix-session-doc-example'
2021-11-22 16:24:31 +01:00
Damir Jelić
b91773a276
Merge branch 'store-upgrade-fix'
2021-11-22 16:23:53 +01:00
Damir Jelić
fbc01f015d
fix(sdk): Use the correct restore method in an example
2021-11-22 15:44:35 +01:00
Damir Jelić
5d26e36e1f
fix(crypto): Make sure we store the store version using the right key
2021-11-22 15:28:21 +01:00
Damir Jelić
c4f60dd163
fix(crypto): Only upload our own signature when verifying user identities
2021-11-22 12:33:18 +01:00
Jonas Platte
b4220bd824
Reduce the size of Client
...
… by moving all of its fields into an inner reference-counted type
rather than using reference counting for all fields individually.
Some fields are still refcounted individually and thus go through an
extra layer of indirection, but the size and clone simplification should
still make this change worthwhile.
2021-11-20 02:01:07 +01:00
Jonas Platte
73c5bfed28
Switch from futures-locks to async-lock
2021-11-20 02:01:07 +01:00
Jonas Platte
2456beaf88
Make Result alias more flexible
2021-11-20 00:00:08 +01:00
Jonas Platte
cc6f97bee9
Fix missing word
2021-11-20 00:00:08 +01:00
Jonas Platte
8f47e6ffe9
Remove copy-pasted module documentation
...
It doesn't seem right that both room and room_member have the same
description. Also room_member is private and doesn't usually show up in
docs.
2021-11-20 00:00:08 +01:00
Jonas Platte
544b24b0ef
Move some code out of client.rs
...
It is by far the biggest module of the matrix-sdk crate.
2021-11-20 00:00:08 +01:00
Benjamin Kampmann
94d3ffa18d
infrastructure for indexeddb cryptostore
2021-11-19 21:26:33 +01:00
Jonas Platte
1e13e06e34
Make event-handling related Client fields private
2021-11-19 20:48:27 +01:00
Benjamin Kampmann
9e83bcb6ce
fixing browser test
2021-11-19 14:52:11 +01:00
Benjamin Kampmann
917e9016cd
clean up API and corresponding docs
2021-11-19 13:52:03 +01:00
Damir Jelić
5a4aa71f6a
feat(base): Add a From login response implementation for the Session
2021-11-19 09:41:48 +01:00
Damir Jelić
6606703001
docs(base): Remove anyhow from an example since it isn't used
2021-11-19 09:12:51 +01:00
Andy Balaam
0c35d8890d
Improve Session docs example
2021-11-18 17:14:34 +00:00
Benjamin Kampmann
76454e6b8b
style fix
2021-11-18 17:40:56 +01:00
Andy Balaam
7d7bd97812
Document how to create a Session
2021-11-18 14:18:16 +00:00
Benjamin Kampmann
10d4fe53f2
clarify API
2021-11-18 15:01:07 +01:00
Benjamin Kampmann
3fcfe98de2
minor clippy fixes
2021-11-18 13:54:24 +01:00
Benjamin Kampmann
b16c660258
fixing typo
2021-11-18 13:48:56 +01:00
Benjamin Kampmann
7df36e3d49
first attempt at creating a CI job for wasm tests
2021-11-18 13:37:11 +01:00
Benjamin Kampmann
3e11e0dbb4
fixing style
2021-11-18 13:36:45 +01:00
Benjamin Kampmann
a2b80f03d3
move and unify usage of store_key
2021-11-18 12:58:17 +01:00
Benjamin Kampmann
e60349604d
implement custom value
2021-11-18 12:40:45 +01:00
Andy Balaam
f5ba9a5eea
Update BackupMachine documentaton to refer to enable_backup_v1
2021-11-18 10:28:03 +00:00
Benjamin Kampmann
e7ec86140b
generic tests passing'
2021-11-17 21:30:12 +01:00
Benjamin Kampmann
5bba24ce77
activating browser tests
2021-11-17 18:18:20 +01:00
Benjamin Kampmann
b8af613aef
big batch
2021-11-17 13:08:58 +01:00
Damir Jelić
2e4d5f25cb
feat(crypto): Add a method to get the algorithm of the public backup key
2021-11-17 13:02:23 +01:00
Damir Jelić
534e50da57
fix(crypto): Rename the enable_backup method so we can add a v2 one
2021-11-17 13:02:23 +01:00
Damir Jelić
1ffa06884a
fix(crypto): Rename the decrypt method on the RecoveryKey struct
...
The new backup algorithm reuses the same key but uses a different
construct to encrypt/decrypt room keys. This reflects that our decrypt
method uses the v1 algorithm.
2021-11-17 13:02:23 +01:00
Damir Jelić
670e212d9b
docs(crypto): Fill out the docs for the backup related types
2021-11-17 13:02:23 +01:00
Damir Jelić
6fc703b4a3
fix(crypto): Fix a bunch of clippy warnings
2021-11-17 13:02:23 +01:00
Damir Jelić
33b7062515
fix(crypto): Fix a bunch of typos
2021-11-17 13:01:58 +01:00
Damir Jelić
a7bbeb7ef5
improvement(crypto): Add tests for the recovery key
2021-11-17 13:01:58 +01:00
Damir Jelić
34ec4ac3c9
improvement(crypto): Add tests for the backup machine
2021-11-17 13:01:58 +01:00
Damir Jelić
3f227de023
fix(crypto): Fix the backed up room key count in the memory store
2021-11-17 13:01:58 +01:00
Damir Jelić
a417aa23fa
fix(crypto): Load the recovery key from the sled store
2021-11-17 13:01:58 +01:00
Damir Jelić
f8fdfd1613
fix(crypto): Add a proper exception when creating the Pk decryption object
2021-11-17 13:01:58 +01:00
Damir Jelić
1fdd560ff0
fix(crypto): Remove a unneeded clippy attribute
2021-11-17 13:01:58 +01:00
Damir Jelić
878969a5c4
docs(crypto): Add some docs for the backup related types
2021-11-17 13:01:58 +01:00
Damir Jelić
c6d073ebd7
fix(crypto): Remove some dead code
2021-11-17 13:01:58 +01:00
Damir Jelić
2b5ae869cd
feat(crypto): Gossip the backup recovery key if requested
2021-11-17 13:01:58 +01:00
Damir Jelić
2db52eed7c
feat(crypto): Request the recovery key when we request secrets
2021-11-17 13:01:58 +01:00
Damir Jelić
656edce75a
improvement(crypto): Make the backup logging prettier
2021-11-17 13:01:58 +01:00
Damir Jelić
4c021dea5e
fix(crypto): Correctly reset the backup state of room keys
2021-11-17 13:01:58 +01:00
Damir Jelić
bbd76dafa0
fix(crypto): Fix a bunch of clippy warnings
2021-11-17 13:01:58 +01:00
Damir Jelić
4f2c91d848
feat(crypto): Add a method to decrypt messages using the recovery key
2021-11-17 13:01:58 +01:00
Damir Jelić
6f5b6900d6
fix(crypto): Flush when we ugprade the DB
2021-11-17 13:01:58 +01:00
Damir Jelić
eddc7bd6af
feat(crypto): Add a method to check the signature of a backup version
2021-11-17 13:01:58 +01:00
Damir Jelić
dfef6370b6
feat(crypto): Add a method to verify uploaded backups
2021-11-17 13:01:58 +01:00
Damir Jelić
b5babdb6c4
fix(crypto): Don't load all room keys when backing up
2021-11-17 13:01:58 +01:00
Damir Jelić
df53eb00ab
fix(crypto): Fix a deadlock when generating the backup request
2021-11-17 13:01:58 +01:00
Damir Jelić
63915171fc
feat(crypto): Add a method to check if backups are enabled
2021-11-17 13:01:58 +01:00
Damir Jelić
4873914d4d
feat(crypto): Initial support for server-side backups of room keys
2021-11-17 13:01:44 +01:00
Benjamin Kampmann
8a2732ab5d
first steps
2021-11-15 20:05:43 +01:00
Damir Jelić
f069387d58
docs(sdk): Add an example to the restore_login method
2021-11-15 16:15:05 +01:00
ftilde
8815c05108
Refactor Joined::send_attachment
...
Instead of manually modifying *EventContent structs, the ruma
constructors *::encrypted and *::plain are used now depending on whether
encryption should be used for the attachment or not.
2021-11-13 01:39:00 +01:00
ftilde
dfc2ed7a33
Prefer MediaType::Encrypted if url and file are present
...
Some clients (including those using matrix-rust-sdk currently) may add
encrypted file info as well as the url to the encrypted blob to the
*EventContent. Interpreting the presence of an url as an indicator of
unencrypted message (like was done before) would result in access to the
encrypted blob in `get_media_content`.
Fixes #406 .
2021-11-13 01:39:00 +01:00
Jonas Platte
38a8253aa8
Turn register_event_handler(_context)? examples into proper doctests
...
Previously, they didn't actually run the methods they were showing the
use of.
2021-11-12 12:39:07 +01:00
Jonas Platte
5fed5cdeed
Allow adding custom event handler context
2021-11-12 12:39:07 +01:00
Jonas Platte
df50d59de2
Update signature of AppService::register_event_handler
...
It no longer requires a mutable `AppService` and can also be chained,
like `Client::register_event_handler`.
2021-11-11 19:28:40 +01:00
Damir Jelić
1651952903
docs(sdk): Remove a bunch of unwraps from some doc examples
2021-11-11 16:58:43 +01:00
Damir Jelić
33a43af20e
improvement(crypto): Use a type for the result of the room key import method
2021-11-11 16:57:31 +01:00
Damir Jelić
6a66a67454
fix(crypto): Fix the importing of exported room keys
2021-11-11 16:05:14 +01:00
Jonas Platte
83b908754e
Remove unused dependencies
...
Found by cargo-udeps.
2021-11-10 21:43:56 +01:00
Jonas Platte
02b0ed2b42
Reduce dependencies on futures-* crates
2021-11-10 20:39:35 +01:00
Jonas Platte
c124cf5b62
Remove unnecessary use of future::ready
2021-11-10 20:39:03 +01:00
Jonas Platte
dfdf794199
Remove unnecessary use of TryFutureExt
2021-11-10 20:12:56 +01:00
Damir Jelić
df2c0bd6e9
docs(sdk): Fix a typo in the enable_encryption method
2021-11-09 19:52:46 +01:00
Damir Jelić
2e04a3753d
Merge branch 'one-time-key-generationf-fix'
2021-11-09 13:50:08 +01:00
Damir Jelić
e1e864c606
fix(crypto): Save the account if we created a new key upload request
2021-11-09 12:30:48 +01:00
Damir Jelić
7f3067553b
fix(crypto): Don't generate new one-time keys unless the existing ones are uploaded
...
This is helpful if the caller doesn't have propper request retrying.
Calling the outgoing_requests() method without actually uploading
all the requests would end up generating too many one-time keys and
removing some one-time keys that weren't used yet.
This would manifest itself down the line as undecryptable to-device
messages.
2021-11-09 11:45:20 +01:00
Julian Sparber
253d6c9af8
matrix-qrcode: Use GenericImage and GenericImageView trait
...
This changes `QrVerificationData::from_luma()` to accept any struct that
implements GenericImage and GenericImageView.
This way we don't force a specific container for the ImageBufffer, hence
the developer doesn't necessarily need to copy the image data into a
Vec<u8>.
2021-11-09 11:33:38 +01:00
Damir Jelić
1f1ae0059e
docs: Remove the now unneeded doc cfg attributes
2021-11-09 10:43:42 +01:00
Damir Jelić
05a190ee5a
docs(sdk): Add an example that prints out the SAS emojis
2021-11-08 17:17:42 +01:00
Damir Jelić
ed561f7b9e
improvement(crypto): Use a struct for the SAS emoji/description pairs
2021-11-08 17:17:14 +01:00
Damir Jelić
fba12b3926
docs(sdk): Explain how room keys work in the encryption module
2021-11-08 15:32:51 +01:00
Damir Jelić
1b2ef50ded
docs(sdk): Explain why it may be problematic to manually verify devices
2021-11-08 15:32:51 +01:00
Damir Jelić
c79481c6fa
docs(sdk): Clarify what it means for a device to be verified
2021-11-08 15:32:51 +01:00
Damir Jelić
f5b98a62ab
docs(sdk): Describe the ways we can restore a client
2021-11-08 15:32:51 +01:00
Damir Jelić
f5a6972feb
improvement(crypto): Rename the EncryptionInfo struct for attachments
2021-11-08 15:32:51 +01:00
Damir Jelić
1faaba39c7
docs(sdk): Explain how cross signing helps a bit better
2021-11-08 15:32:51 +01:00
Damir Jelić
e58eb70924
chore: Switch to the 2021 edition
2021-11-08 15:32:51 +01:00
Damir Jelić
4bfc1041cc
docs(sdk): Improve an entry in the e2ee failure table
2021-11-08 15:32:51 +01:00
Damir Jelić
b6f7e85964
feat(sdk): Add a method to enable encryption for a room
2021-11-08 15:32:51 +01:00
Damir Jelić
b9b02ff167
docs(sdk): Add another entry to the failure table
2021-11-08 15:32:51 +01:00
Damir Jelić
1aba90cd0b
docs(sdk): Consistent headings
2021-11-08 15:32:51 +01:00
Damir Jelić
3f689e9c74
docs(sdk): Introduce a failure table for the encryption module
2021-11-08 15:32:51 +01:00
Damir Jelić
d744948a27
docs(sdk): Fix a typo
2021-11-08 15:32:51 +01:00
Damir Jelić
ccc3a005cb
docs(sdk): A couple small clarifications
2021-11-08 15:32:51 +01:00
Damir Jelić
605c3b056f
docs(sdk): Use a table to describe our features
2021-11-08 15:32:51 +01:00
Damir Jelić
387d25c438
docs(sdk): Explain a bit more how devices are backed by device keys
2021-11-08 15:32:51 +01:00
Damir Jelić
050f62baa7
docs(sdk): Clarify the manual verification a bit more
2021-11-08 15:32:51 +01:00
Damir Jelić
afe4f628c3
docs(sdk): Improve the UserIdentity docs
2021-11-08 15:32:51 +01:00
Damir Jelić
3964eea2e2
docs(sdk): Add some more E2EE related docs
2021-11-08 15:32:51 +01:00
Damir Jelić
687ebabca9
Merge branch 'reciprocate_qr_scanning'
2021-11-05 19:35:57 +01:00
Julian Sparber
635ee5f130
matrix-sdk: Send reciprocate to other side when scanning a Qr Code
...
We need to tell the other side that we scanned there Qr Code.
2021-11-05 19:05:43 +01:00
Jonas Platte
b27795c0d1
Upgrade ruma
2021-11-05 16:05:25 +01:00
Jonas Platte
f21faa9e2e
Remove unused imports in doctests
2021-11-05 15:39:02 +01:00
Jonas Platte
77de8383fe
Fix clippy warning
2021-11-05 15:25:16 +01:00
Jonas Platte
cdfd5f9f0c
Remove unnecessary use of Ruma event content enums
2021-11-05 15:16:17 +01:00
Kévin Commaille
5eb7029568
matrix-sdk: Allow to reconfigure client with login response discovery info
...
Fixes #219
2021-11-02 16:45:03 +01:00
Kévin Commaille
52910d50b4
matrix-sdk: Remove unecessary mut for client
...
Client does not need to be mutable to set the homeserver
2021-11-02 11:59:44 +01:00
Julian Sparber
8dcfd1176f
matrix-sdk-crypto: Drop MutexGuard in VerificationRequest::scan_qr_code()
...
We can't move MutexGuards across threads and therefore we need to drop
it before awaitng on a future since a task may be moved between threads.
2021-10-29 16:33:25 +02:00
Damir Jelić
a85f29d904
feat(sdk): Expose the method and types to scan QR codes
2021-10-28 11:54:28 +02:00
Damir Jelić
292425fd80
fix(crypto): Make sure we don't treat our own device as a new one every time
2021-10-28 11:24:02 +02:00
Damir Jelić
19266f643c
improvement(crypto): Improve the logs for the keys/query handling
2021-10-28 11:24:02 +02:00
Damir Jelić
3853d0c9d7
improvement(crypto): Log the mismatched user/key if checking fails
2021-10-27 16:23:34 +02:00
Damir Jelić
3c59e186d9
improvement(crypto): Improve the logging when we decrypt room events
2021-10-27 15:00:04 +02:00
Damir Jelić
e448a76484
improvement(crypto): Improve the to-device decryption logs
2021-10-27 14:57:07 +02:00
Damir Jelić
0ee8d2733a
fix(crypto): Improve the log lines for the room key encryption flow
2021-10-27 14:44:27 +02:00
Damir Jelić
38ae79ba3c
Merge branch 'room-is-space'
2021-10-27 11:08:33 +02:00
Amanda Graven
d06371d458
Add convenience function to check if a room is a space
2021-10-27 10:39:19 +02:00
Damir Jelić
8b200c8200
Merge branch 'appservice-user-store'
2021-10-26 12:00:27 +02:00
Damir Jelić
2a285de1b0
Merge branch 'appservice-event-handler'
2021-10-26 11:30:30 +02:00
Amanda Graven
093588d5a3
Event handlers for room and user queries
...
Add a member to AppService which can store closures that will be invoked
when the homeserver invokes query endpoints.
2021-10-26 10:50:23 +02:00
Amanda Graven
a9e990142a
appservice: Store which users have been registered
2021-10-26 09:51:51 +02:00
Damir Jelić
42bec97b68
Merge branch 'blocking'
2021-10-25 14:25:59 +02:00
Damir Jelić
bc8641666c
fix(sdk): Only import the crypto store type if encryption is enabled
2021-10-25 13:30:33 +02:00
Damir Jelić
74342a8775
Merge branch 'event-handling'
2021-10-25 13:02:27 +02:00
Damir Jelić
bc92c02772
Merge branch 'erikj/add_crypto_store_setting'
2021-10-25 13:00:55 +02:00
Damir Jelić
f434b4d970
Merge branch 'erikj/export_gossip_request'
2021-10-25 13:00:07 +02:00
Damir Jelić
86657736e8
chore: Fix some new clippy warnings.
2021-10-25 12:40:34 +02:00
Erik Johnston
a037e6b1a7
Add Config::crypto_store
...
This allows setting of the crypto store in the high level client, in the
same way you can in the base client.
2021-10-25 10:38:28 +01:00
Jonas Platte
4570d7194e
Add SyncEvent impls for SyncRedactionEvent
2021-10-22 22:11:01 +02:00
Erik Johnston
a7c97e731d
Document types correctly
2021-10-22 11:57:21 +01:00
Erik Johnston
c093b68078
Also export SecretInfo
2021-10-22 11:33:34 +01:00
Erik Johnston
c824278565
Export GossipRequest
...
The `matrix-sdk-store::CryptoStore` uses the type in its definition,
so we export it to allow third party implementations.
2021-10-22 11:29:15 +01:00
Julian Sparber
8ee3b6f909
sled_store: Run read operations on blocking thread
2021-10-21 14:59:33 +02:00
Denis Kasak
9e1024f4b5
refactor: Use structured logging field for room_id.
2021-10-14 12:22:13 +02:00
Denis Kasak
8cab5b811f
docs: Doc tweaks.
2021-10-14 10:22:25 +02:00
Denis Kasak
1c36e62e2c
fix: Unbreak encryption.
...
And add some docs and logging statements.
cb8a42a529 broke encryption because it
elided the call to `send_raw` from `send` and instead did a direct HTTP
request. Since event encryption is only called from `send_raw`, this
made all events cleartext.
2021-10-14 10:22:25 +02:00
Julian Sparber
0a92f7161a
client: make sync_stream() return an infallible stream
...
This way the developer can decide what to do on an error
2021-10-11 18:33:06 +02:00
Damir Jelić
8af768bf30
chore(base): Remove the non-exhaustive patterns lint
...
The lint is only available on nightly, but requires to be enabled via a
feature, which is only available for nightly.
2021-10-11 11:06:32 +02:00
Damir Jelić
61375a6245
chore: Add a github action to check for typos
2021-10-11 09:49:27 +02:00
Damir Jelić
3c08b5cf09
chore: Fix a bunch of typos
2021-10-11 09:49:25 +02:00
Damir Jelić
498d7b4666
Merge branch 'dkasak/doc-improvements'
2021-10-11 09:47:21 +02:00
Damir Jelić
7cfa9dbf58
Merge branch 'dkasak/key-sharing-algorithm-rendering'
2021-10-11 09:46:43 +02:00
Damir Jelić
5aa6aeac16
Merge branch 'flow_id'
2021-10-05 20:47:33 +02:00
Jonas Platte
b6261d014c
Add custom event examples for Joined::{send,send_state_event}
2021-10-05 18:42:21 +02:00
Jonas Platte
8455164a69
Simplify command_bot example
2021-10-05 18:20:07 +02:00
Jonas Platte
b959d4be29
Use new event type aliases
2021-10-05 18:20:07 +02:00
Jonas Platte
39d6ebdd53
Don't panic if serialization of user-provided events fails
2021-10-05 18:20:07 +02:00
Jonas Platte
0f52cd8039
Stop relying on enum deserialization for adding room_id
2021-10-05 18:20:07 +02:00
Jonas Platte
4a50561867
crypto: Simplify Account::parse_decrypted_to_device_event
2021-10-05 18:20:07 +02:00
Jonas Platte
cb8a42a529
Upgrade to latest Ruma git main
2021-10-05 18:20:07 +02:00
Jonas Platte
d16d21c54f
crypto: Refactor ToDeviceRequest construction
2021-10-05 18:20:07 +02:00
Jonas Platte
339dfefb53
Replace qualified path with use (style consistency)
2021-10-05 18:20:07 +02:00
Jonas Platte
b8e8cfd149
Fix clippy warnings
2021-10-05 18:20:07 +02:00
Jonas Platte
a40cf26aa7
Fix formatting
2021-10-05 17:40:50 +02:00
Damir Jelić
fe8ecbbeb8
Merge branch 'fix_lock_on_await'
2021-10-05 10:36:02 +02:00
Damir Jelić
2686e987a6
Merge branch 'dkasak/share-all-indices-with-own-trusted-devices'
2021-10-05 10:13:49 +02:00
Julian Sparber
a3f078cb96
encryption: Expose FlowId on VerificationRequest
...
Fixes: https://github.com/matrix-org/matrix-rust-sdk/issues/367
2021-10-04 22:42:39 +02:00
Julian Sparber
82659142c5
crypto: Fix VerificationRequest::generate_qr_code()
...
We can't keep a lock on the `inner` therefore clone it. It's not pretty
but we do the same in `start_sas()`.
2021-10-04 17:04:09 +02:00
Denis Kasak
3c03c64778
docs(crypto): Reword.
...
- Bring the wording in line with the wording on the matrix_sdk crate.
- Style fixes.
- Formatting.
2021-10-04 14:53:30 +02:00
Denis Kasak
fdbed7fbf8
docs(crypto): Add room key sharing decision tree to the docs.
2021-10-04 14:48:12 +02:00
Denis Kasak
759bc76f04
docs: More typo/style fixes.
2021-10-04 14:36:37 +02:00
Denis Kasak
ab1657b811
docs: Flesh out intro section a bit.
...
- Mention subcrates.
- Point out `Client` as the central component.
2021-10-04 14:34:18 +02:00
Denis Kasak
b219a347f6
Reword opening paragraph.
2021-10-04 13:15:22 +02:00
Denis Kasak
bd82738630
Fix typo.
2021-10-04 13:06:50 +02:00
Amanda Graven
9829b45ce8
Specifiy edition in rustfmt.toml
2021-10-04 12:56:49 +02:00
Denis Kasak
f2c0abeb58
Add decision tree rendering of the algorithm.
2021-10-04 12:51:16 +02:00
Denis Kasak
55731922e8
Add decision tree model of the key sharing algorithm.
...
And a tool to render it.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 12:49:16 +02:00
Denis Kasak
671efb2313
Await result.
2021-10-04 11:13:02 +02:00
Denis Kasak
da052ed9aa
clippy fix
2021-10-04 11:12:46 +02:00
Denis Kasak
49e722ffbf
cargo fmt
2021-10-04 10:57:11 +02:00
Denis Kasak
de2e2539b7
Write a test.
...
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 10:51:31 +02:00
Denis Kasak
5f87ccdcd9
Explain return value in the docstring.
...
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 10:51:31 +02:00
Denis Kasak
bf2195b999
crypto: Share all indices with own trusted devices.
...
This fixes an edge case in the key sharing decision algorithm in which
your own trusted devices could be getting a limited session upon a
reshare. It also simplifies the algorithm a bit by bringing the check
for an own and trusted device to the start.
If the requesting device is a trusted/verified device of our own, we
share the session in full, regardless of whether we've previously shared
with that device and at which index. Otherwise, we do the "have we
shared previously" check via the outbound session and only share from
the index it was originally shared at, as before.
Signed-off-by: Denis Kasak <dkasak@termina.org.uk >
2021-10-04 10:45:25 +02:00
Damir Jelić
3042209cf6
crypto: Check that the event was encrypted for the right room
2021-09-21 17:27:31 +02:00
Damir Jelić
87728268e2
crypto: Don't borrow the plaintext to later clone it
2021-09-21 16:48:42 +02:00
Jonas Platte
bbbd5648e0
Fix comment typos
2021-09-21 15:36:04 +02:00
Jonas Platte
b813735dd2
Remove unused dev-dependency
2021-09-21 15:24:55 +02:00
Jonas Platte
871a245702
crypto: Avoid unnecessary event serialization
2021-09-21 15:20:02 +02:00
Jonas Platte
f783fb9830
Fix typo: Missmatched => Mismatched
2021-09-21 15:19:21 +02:00
Damir Jelić
fa5aea2ca1
Merge branch 'fix-anyhow-feature'
2021-09-21 14:54:40 +02:00
Jonas Platte
2128d0bfcc
CI: Use Nightly Clippy
2021-09-21 13:12:46 +02:00
Jonas Platte
42061c9bf5
CI: Run clippy on more (Cargo) targets
2021-09-21 13:12:34 +02:00
Jonas Platte
d0851c8a9e
Fix new (Nightly) Clippy warnings
2021-09-21 13:11:53 +02:00
Jonas Platte
0817bc490e
Add missing required-features for examples
2021-09-21 13:11:31 +02:00
Jonas Platte
3621b62418
Fix Client::register future not being Send under warp feature
...
Caused by https://github.com/tokio-rs/tracing/issues/1487 .
2021-09-21 13:07:40 +02:00
Jonas Platte
cbc0739041
Re-export anyhow and eyre features from matrix-sdk-appservice
2021-09-21 11:59:47 +02:00
Jonas Platte
f752bded4b
Add eyre feature to matrix-sdk
2021-09-21 11:59:47 +02:00
Jonas Platte
6cbb07bc2d
Fix broken anyhow feature
2021-09-21 11:59:15 +02:00
Damir Jelić
4d048934e6
Merge branch 'master-rename'
2021-09-20 11:18:17 +02:00
Damir Jelić
544a66fa34
chore: Rename the master branch
2021-09-20 10:09:40 +02:00
Jonas Platte
533c86d285
Run event / notification handler callbacks in order
2021-09-17 20:46:32 +02:00
Damir Jelić
15e9d03c2c
fix(sdk): Don't retry requests in the tests
...
Since now sync_once() sends out E2EE requests after the sync and our
tests only set up the `/sync` endpoint using mockito we're going to be
stuck in a retry loop trying to send out the mentioned requests.
It's fine to disable request retrying and let those requests fail.
2021-09-17 20:19:13 +02:00
Damir Jelić
ef3f827769
docs(sdk): Fix a typo
2021-09-17 20:18:42 +02:00
Damir Jelić
d34b83851f
feat(sdk): Add a getter for the Session
2021-09-17 20:18:17 +02:00
Damir Jelić
61eefbbadd
docs(sdk): Fix some doc links.
2021-09-17 11:10:18 +02:00
Damir Jelić
544d15c574
docs(sdk): Improve a bunch of Client docs
2021-09-17 11:10:18 +02:00
Damir Jelić
8ed06883f6
fix(sdk): Don't take ownership of the user id when logging in using SSO
2021-09-17 11:10:18 +02:00
Damir Jelić
39edd32072
feat(sdk): Add a method to sync as an async stream
2021-09-17 10:54:20 +02:00
Damir Jelić
051d935b28
docs(sdk): Add better docs and examples to the sync methods
2021-09-17 10:54:20 +02:00
Damir Jelić
37904007bb
feat(sdk): Send the outgoing E2EE requests out concurrently
2021-09-16 15:43:50 +02:00
Damir Jelić
3dc9f78051
fix(sdk): Move the crypto plumbing in the sync to the sync_once method
...
This would allow people to avoid the `sync()` method and let them drive
their own syncs.
Until now using `sync()` only would mean that the crypto requests would
never have been sent out.
2021-09-16 14:36:16 +02:00
Damir Jelić
729a29352b
chore(sdk): Move the crypto plumbing of the sync into a separate method
2021-09-16 14:14:37 +02:00
Damir Jelić
626f4b92b5
chore(sdk): Remove some unwraps
2021-09-16 14:06:44 +02:00
Damir Jelić
fa6230a08a
fix(sdk): Use a better variable name for the file when uploading
2021-09-15 22:08:45 +02:00
Damir Jelić
866ab33c45
chore: Remove some unneeded clippy silences
2021-09-15 20:48:15 +02:00
Damir Jelić
7764f01b59
fix(crypto): Only send cancellations if there were multiple request recipients
2021-09-15 20:28:16 +02:00
Damir Jelić
ff9bb94ab4
docs(sdk): Simplify the event sending examples
2021-09-15 20:27:36 +02:00
Damir Jelić
28412344d5
docs(sdk): Fix the link to the examples dir
2021-09-15 14:20:14 +02:00
Damir Jelić
bae6b33497
feat(sdk): Add the ability to send out custom message events
2021-09-15 14:20:14 +02:00
Damir Jelić
7a21bdd573
docs(sdk): Fix a small typo
2021-09-15 10:36:58 +02:00
Damir Jelić
43011261a8
fix(sdk): Remove the room_send method from the Client
...
This method is a bit dangerous if the room is encrypted, e.g. people can
send events before the room state has been fetched and thus accidentally
send out unencrypted events in an encrypted room.
2021-09-15 10:36:58 +02:00
Damir Jelić
d8b60dfe55
feat(sdk): Add support to send out custom state events
2021-09-14 23:36:09 +02:00
Damir Jelić
70ab0f446d
chore: Sort the deps in our Cargo.toml files
2021-09-14 16:38:33 +02:00
Damir Jelić
af74988a83
chore: Rename the crate folders to use dashes instead of underscores
2021-09-14 16:38:33 +02:00
Damir Jelić
31b7063e68
docs(sdk): Remove unwraps from the joined room doc examples
2021-09-14 16:38:33 +02:00
Damir Jelić
f42883eaad
docs(sdk): Remove some unwraps from the encryption doc examples
2021-09-14 16:38:33 +02:00
Damir Jelić
7de782d3a2
chore(sdk): Move the various config structs into its own module
2021-09-14 16:38:33 +02:00
Damir Jelić
cf26557cc2
chore(sdk): Move the sso related imports into the sso login method
2021-09-14 13:20:03 +02:00
Damir Jelić
29d11db73a
chore(sdk): Move the e2ee related client methods to the encryption module
2021-09-14 13:10:22 +02:00
Damir Jelić
e8c5b0766e
chore(sdk): Move all the crypto related module under an encryption module
2021-09-14 12:32:59 +02:00
Damir Jelić
041ef66c01
chore: Move the crates into a subfolder
2021-09-14 11:59:21 +02:00
Damir Jelić
b3bbcd1729
chore: Set a rust version in our crates
2021-09-14 10:25:04 +02:00
Damir Jelić
69ccc5a9f9
chore(sdk): Bump the version
CI / Run clippy (push) Has been skipped
CI / linux / WASM (push) Has been skipped
CI / linux / appservice / stable / warp (push) Has been skipped
CI / macOS / appservice / stable / warp (push) Has been skipped
CI / linux / features-markdown (push) Has been skipped
CI / linux / features-socks (push) Has been skipped
CI / linux / features-sso_login (push) Has been skipped
CI / linux / features-no-sled (push) Has been skipped
CI / linux / features-sled_cryptostore (push) Has been skipped
CI / linux / features-no-encryption-and-sled (push) Has been skipped
CI / linux / features-require_auth_for_profile_requests (push) Has been skipped
CI / linux / features-no-encryption (push) Has been skipped
CI / linux / features-rustls-tls (push) Has been skipped
CI / linux / beta (push) Has been skipped
CI / linux / stable (push) Has been skipped
CI / macOS / stable (push) Has been skipped
CI / Check style (push) Failing after 38s
2021-09-13 11:49:39 +02:00
Damir Jelić
f9f83eaa39
chore(base): Bump the version
2021-09-13 11:49:39 +02:00
Damir Jelić
f243a684d4
chore(crypto): Bump the version
2021-09-13 11:49:39 +02:00
Damir Jelić
a82de88963
chore(common): Bump the version
2021-09-13 11:49:39 +02:00
Damir Jelić
97e15feb0d
Merge branch 'fix-sdk-common-dep-feature'
2021-09-13 11:47:20 +02:00
Antoine Martin
51072a5dab
fix(common): wasm_bindgen dependency feature
...
instant doesn't need wasm_bindgen on non wasm targets
2021-09-13 11:01:05 +02:00
Damir Jelić
500bb6e940
fix(sdk): Test that invited member events get emitted
2021-09-13 11:00:24 +02:00
Jonas Platte
140630745f
Fix confusion between initial / stripped state events
...
InviteState contains stripped state events, and initial state events are
not used anywhere in the sync response.
2021-09-13 11:00:24 +02:00
Damir Jelić
1ea9c9a915
fix(base): Allow the presence of a room member to be dead for now
2021-09-13 10:18:45 +02:00
Damir Jelić
b8001b78b4
fix(crypto): Fix some clippy warnings
2021-09-13 10:18:23 +02:00
Damir Jelić
a6916dd9dd
chore(sdk): Bump the version
CI / Check style (push) Failing after 38s
CI / Run clippy (push) Has been skipped
CI / linux / WASM (push) Has been skipped
CI / linux / appservice / stable / warp (push) Has been skipped
CI / macOS / appservice / stable / warp (push) Has been skipped
CI / linux / features-markdown (push) Has been skipped
CI / linux / features-socks (push) Has been skipped
CI / linux / features-sso_login (push) Has been skipped
CI / linux / features-no-sled (push) Has been skipped
CI / linux / features-sled_cryptostore (push) Has been skipped
CI / linux / features-no-encryption-and-sled (push) Has been skipped
CI / linux / features-require_auth_for_profile_requests (push) Has been skipped
CI / linux / features-no-encryption (push) Has been skipped
CI / linux / features-rustls-tls (push) Has been skipped
CI / linux / beta (push) Has been skipped
CI / linux / stable (push) Has been skipped
CI / macOS / stable (push) Has been skipped
2021-09-10 21:41:37 +02:00
Damir Jelić
b96624890e
Merge branch 'event-handler-encryption-info'
2021-09-10 21:36:16 +02:00
Damir Jelić
7e9090399b
chore(qrcode): Bump the version
CI / Run clippy (push) Has been skipped
CI / linux / WASM (push) Has been skipped
CI / linux / appservice / stable / warp (push) Has been skipped
CI / macOS / appservice / stable / warp (push) Has been skipped
CI / linux / features-markdown (push) Has been skipped
CI / linux / features-socks (push) Has been skipped
CI / linux / features-sso_login (push) Has been skipped
CI / linux / features-no-sled (push) Has been skipped
CI / linux / features-sled_cryptostore (push) Has been skipped
CI / linux / features-no-encryption-and-sled (push) Has been skipped
CI / linux / features-require_auth_for_profile_requests (push) Has been skipped
CI / linux / features-no-encryption (push) Has been skipped
CI / linux / features-rustls-tls (push) Has been skipped
CI / linux / beta (push) Has been skipped
CI / linux / stable (push) Has been skipped
CI / macOS / stable (push) Has been skipped
CI / Check style (push) Failing after 34s
2021-09-10 20:45:17 +02:00
Damir Jelić
9c53c478d9
chore(base): Bump the version
2021-09-10 19:54:58 +02:00
Damir Jelić
e0447c8190
chore(crypto): Bump the version
2021-09-10 19:28:13 +02:00
Damir Jelić
4bcbcb146e
Merge branch 'feature/qrcode-feature'
2021-09-10 19:20:08 +02:00
Damir Jelić
ae0f4c4cc5
docs(sdk): Add some missing hints for the qrcode feature
2021-09-10 17:41:33 +02:00
Damir Jelić
40b465a093
chore(test): Bump the version
CI / Check style (push) Failing after 41s
CI / Run clippy (push) Has been skipped
CI / linux / WASM (push) Has been skipped
CI / linux / appservice / stable / warp (push) Has been skipped
CI / macOS / appservice / stable / warp (push) Has been skipped
CI / linux / features-markdown (push) Has been skipped
CI / linux / features-socks (push) Has been skipped
CI / linux / features-sso_login (push) Has been skipped
CI / linux / features-no-sled (push) Has been skipped
CI / linux / features-sled_cryptostore (push) Has been skipped
CI / linux / features-no-encryption-and-sled (push) Has been skipped
CI / linux / features-require_auth_for_profile_requests (push) Has been skipped
CI / linux / features-no-encryption (push) Has been skipped
CI / linux / features-rustls-tls (push) Has been skipped
CI / linux / beta (push) Has been skipped
CI / linux / stable (push) Has been skipped
CI / macOS / stable (push) Has been skipped
2021-09-10 17:23:43 +02:00
Damir Jelić
a4de38ce28
chore(common): Bump the version
CI / Check style (push) Failing after 32s
CI / Run clippy (push) Has been skipped
CI / linux / WASM (push) Has been skipped
CI / linux / appservice / stable / warp (push) Has been skipped
CI / macOS / appservice / stable / warp (push) Has been skipped
CI / linux / features-markdown (push) Has been skipped
CI / linux / features-socks (push) Has been skipped
CI / linux / features-sso_login (push) Has been skipped
CI / linux / features-no-sled (push) Has been skipped
CI / linux / features-sled_cryptostore (push) Has been skipped
CI / linux / features-no-encryption-and-sled (push) Has been skipped
CI / linux / features-require_auth_for_profile_requests (push) Has been skipped
CI / linux / features-no-encryption (push) Has been skipped
CI / linux / features-rustls-tls (push) Has been skipped
CI / linux / beta (push) Has been skipped
CI / linux / stable (push) Has been skipped
CI / macOS / stable (push) Has been skipped
2021-09-10 17:23:43 +02:00
Jonas Platte
d6d51ef4b1
Show Option<EncryptionInfo> event handler context in doc example
2021-09-10 17:12:17 +02:00
Damir Jelić
92b0ba21e4
docs(common): Use the readme for the crate level docs
2021-09-10 16:41:50 +02:00
Alexander Sieg
82a99b5267
address code review issues
2021-09-10 16:26:21 +02:00
Alexander Sieg
349e3cae06
Merge remote-tracking branch 'origin/master' into feature/qrcode-feature
2021-09-10 16:00:41 +02:00
Damir Jelić
48b3307934
chore: Bump our deps
2021-09-10 10:08:48 +02:00
Jonas Platte
24253128ae
Add support for Option<EncryptionInfo> as event handler context
2021-09-09 21:03:01 +02:00
Damir Jelić
018544b775
fix(crypto): Remove some dead code
2021-09-09 20:57:58 +02:00
Damir Jelić
44dcd1abdf
docs(crypto): Improve the docs and use the readme for the crate docs
2021-09-09 20:57:58 +02:00
Damir Jelić
9c62908162
docs(base): Use the readme for the crate docs
2021-09-09 20:57:58 +02:00
Damir Jelić
913cb39d28
docs(sdk): Add an example that attaches data to an event handler
2021-09-09 20:57:58 +02:00
Damir Jelić
804a941762
docs(rust): Run the register event handler doc example
2021-09-09 20:57:58 +02:00
Damir Jelić
a7b83d9cd1
docs(sdk): Improve the docs docs and use the readme for the crate docs
2021-09-09 20:57:58 +02:00
Damir Jelić
924405270a
fix(sdk): Use the markdown feature flag of ruma dirrectly
2021-09-09 20:57:58 +02:00
Damir Jelić
4c8412f4a1
docs(qrcode): Use the readme for the crate docs
2021-09-09 20:57:58 +02:00
Jonas Platte
8f46a87f52
Inline handle_sync_events_wrapped
...
It was only used in one place.
2021-09-09 20:44:25 +02:00
Alexander Sieg
c47ac8d6b1
Merge remote-tracking branch 'origin/master' into feature/qrcode-feature
2021-09-09 15:10:18 +02:00
Alexander Sieg
3f09a6abdd
fix clippy warnings
2021-09-09 15:05:57 +02:00
Damir Jelić
b94faa3121
feat(crypto): Document our crypto benchmarks
2021-09-09 13:41:28 +02:00
Damir Jelić
56a30b3a02
chore(crypto): Bump the pprof version and remove our custom profiler
2021-09-09 13:35:43 +02:00
Damir Jelić
ed198a22b6
Merge branch 'custom-store'
2021-09-09 12:24:27 +02:00
Damir Jelić
13b97f6dba
fix(base): Remove an unnecessary unwrap from a test
2021-09-09 12:24:15 +02:00
Damir Jelić
b09b667782
fix(base): Flush when we're saving custom stuff in the sled store
2021-09-09 11:55:05 +02:00
Damir Jelić
85fde6796a
fix(sdk): Remove the custom storage methods from the Client
2021-09-09 11:54:08 +02:00
Damir Jelić
db1efcd1fc
feat(sdk): Expose the cross signing user identities
...
This patch adds support to fetch cross signing user identities from the
crypto store, those can now be used to request verifications and inspect
the master keys of users.
2021-09-09 10:40:36 +02:00
Damir Jelić
f80e4b3f06
feat(sdk): Add a way to wait for a sync to be done
2021-09-09 10:31:35 +02:00
Damir Jelić
5049e8bfbe
docs(sdk): Linkify some verification struct docs
2021-09-09 10:31:35 +02:00
Damir Jelić
6e4a57046e
fix(sdk): Use a pure HTTP error for methods that don't touch local state
2021-09-09 10:30:46 +02:00
Damir Jelić
afc8597d3b
fixup! feat(sdk): Expose the list of tracked users publicly
2021-09-09 10:27:59 +02:00
Damir Jelić
5ff69ad1a9
fix(base): Mark rooms as DMs when we receive an m.direct event
2021-09-09 10:21:05 +02:00
Damir Jelić
05663a42ed
feat(sdk): Add a method to check the status of our private cross signing keys
2021-09-09 10:21:05 +02:00
Damir Jelić
7c2b6ede1f
feat(crypto): Expose the master pubkey struct publicly
2021-09-09 10:21:05 +02:00
Damir Jelić
c6100404e5
feat(sdk): Expose the list of tracked users publicly
2021-09-09 10:20:50 +02:00
Alexander Sieg
df65081785
run nightly rustfmt
2021-09-09 10:15:14 +02:00
Damir Jelić
1bcc74738e
feat(sdk): Add a method to check if a room contains only verified devices
2021-09-09 10:13:00 +02:00
Damir Jelić
0e9a1b42ec
Merge branch 'new-event-handler'
2021-09-09 10:07:02 +02:00
Jonas Platte
c3081de611
Add async context to register_event_handler doctest
2021-09-09 00:49:04 +02:00
Jonas Platte
97731d1240
Add a test for register_event_handler
2021-09-08 23:34:05 +02:00
Jonas Platte
e2432d476e
Add Client::register_notification_handler
...
It had been planned but forgotten.
2021-09-08 23:34:05 +02:00
Jonas Platte
6e571c579d
Allow chaining .register_event_handler()
2021-09-08 23:34:05 +02:00
Jonas Platte
8c499a63dc
Add missing .awaits in event handler doctests
2021-09-08 23:34:01 +02:00
Jonas Platte
ce0cb273bb
Use matrix_sdk_common::executor::spawn instead of tokio::spawn
2021-09-08 21:08:23 +02:00
Jonas Platte
971cdf37f6
Fix doctest imports
2021-09-08 20:45:40 +02:00
Jonas Platte
699039f788
Better document event context argument restrictions
2021-09-08 20:40:26 +02:00
Jonas Platte
c3e25bda1a
Run event / notification handlers in separate async tasks
...
Prevents deadlocks when new handlers are registered from within an
existing handler.
2021-09-08 20:32:06 +02:00
Jonas Platte
606a57203e
Add some documentation about how the event handler abstraction works
2021-09-08 20:29:09 +02:00
Jonas Platte
3c38b26770
Rewrap doc comments
2021-09-08 20:19:07 +02:00
Jonas Platte
67912f3768
Fix / improve event handler documentation
2021-09-08 19:23:19 +02:00
Jonas Platte
bf8945430f
Fix Copyright header
2021-09-08 19:23:03 +02:00
Jonas Platte
cb33f26d5c
Log room retrieval failure in Client::process_sync
2021-09-08 19:22:54 +02:00
Jonas Platte
ddea1bdb9e
Rewrap crate feature flag docs
2021-09-08 19:12:58 +02:00
Alexander Sieg
9b90175500
matrix_sdk: add encryption to qrcode feature
2021-09-08 17:46:26 +02:00
Alexander Sieg
44f6e7a0cf
matrix_sdk: remove compile_error for qrcode feature
2021-09-08 17:31:06 +02:00
Alexander Sieg
55692802c0
crypto: feature-gate dependency on matrix_qrcode
2021-09-08 17:23:10 +02:00
Amanda Graven
5be7bb980d
Add custom storage
...
Add an additional tree to the Store where custom api consumer data may
be stored.
2021-08-25 11:39:43 +02:00
Johannes Becker
33c49c5cd8
appservice: Re-export sdk features
2021-08-17 20:17:17 +02:00
Jonas Platte
d348e77468
Remove extraneous space
2021-08-17 00:32:24 +02:00
Jonas Platte
a5ff4fbef7
Simplify struct initializations by using Default::default
2021-08-17 00:32:23 +02:00
Jonas Platte
cfa69e74f4
Delete unused file
2021-08-17 00:26:02 +02:00
Jonas Platte
36ceb66ba5
Remove prev_content compat hacks
...
This is now handled by Ruma.
2021-08-17 00:26:01 +02:00
Jonas Platte
2fdad12521
Rewrite event handler abstraction
2021-08-17 00:26:01 +02:00
Damir Jelić
623408913c
Merge branch 'secret-sharing'
2021-08-13 20:38:31 +02:00
Damir Jelić
9bae87b0ac
crypto: Fix some clippy warnings
2021-08-13 18:28:52 +02:00
Damir Jelić
00e11d33f1
crypto: Fix user-signing signature uploads
2021-08-13 18:28:52 +02:00
Damir Jelić
680f77beb9
crypto: Add the master key to the SAS MAC if we trust it
2021-08-13 18:28:52 +02:00
Damir Jelić
356506060c
crypto: Remove private cross signing keys if we detect that they changed
2021-08-13 18:28:52 +02:00
Damir Jelić
4e9fe79619
crypto: Start remembering if an inbound group session has been backed up
2021-08-13 18:28:52 +02:00
Damir Jelić
e4a9cf0bba
crypto: Disallow re-sharing room keys with devices with changed curve keys
2021-08-13 18:28:52 +02:00
Damir Jelić
f9de77a75d
crypto: Make sure we request secrets only if the user became trusted
2021-08-13 18:28:52 +02:00
Damir Jelić
315e77ebf2
crypto: Add the users for key claiming to the outgoing requests
...
This makes sure that we immediately claim one-time keys after we
receive the sync changes instead of waiting for a room message to be
sent by the user.
Users may not send a message in a long time which would mean that we'll
likely never share secrets or forward room keys if a Olm session was
missing with the requester.
2021-08-13 18:28:52 +02:00
Damir Jelić
da82fbab4f
crypto: Connect the responding to secret request logic
2021-08-13 18:28:52 +02:00
Damir Jelić
4f46212d1a
crypto: Add a method to manually verify our own user identity
2021-08-13 18:28:52 +02:00
Damir Jelić
d4fe6f5133
crypto: Add methods to manually verify devices and users
2021-08-13 18:28:52 +02:00
Damir Jelić
ee838087ca
crypto: Add methods to export/import cross signing keys
2021-08-13 18:28:52 +02:00
Damir Jelić
b540b8df62
crypto: Add a method to check the state of our private cross signing keys
2021-08-13 18:28:52 +02:00
Damir Jelić
1157594530
crypto: Add a method to check if a user identity is verified
2021-08-13 18:28:52 +02:00
Damir Jelić
8d7fe5e575
crypto: Add a method to check if our own device has been signed by our identity
2021-08-13 18:28:52 +02:00
Damir Jelić
0598bdebc7
crypto: Store our own device we receive from the server
2021-08-13 18:28:52 +02:00
Damir Jelić
7d851a10b5
crypto: Collect common verification stuff into a VerificationStore
2021-08-13 18:28:52 +02:00
Damir Jelić
e401c87246
crypto: When we check the signature of a device use the DeviceKeys struct
2021-08-13 18:28:52 +02:00
Damir Jelić
2cf6ad21d3
crypto: Refactor and split out the gossiping logic
2021-08-13 18:28:52 +02:00
Damir Jelić
adca302dfe
crypto: Fix some clippy warnings
2021-08-13 18:28:52 +02:00
Damir Jelić
68df9b6ed2
crypto: Allow secrets to be requested and imported
2021-08-13 18:28:52 +02:00
Damir Jelić
e57d70b089
crypto: Use the correct pickle key when unpickling cross signing keys
2021-08-13 18:28:52 +02:00
Damir Jelić
5f1e972b3d
crypto: Properly mark verification requests as done
2021-08-13 18:28:52 +02:00
Damir Jelić
3726492cf9
crypto: Improve some log lines
2021-08-13 18:28:52 +02:00
Damir Jelić
bc8c2752e4
crypto: Store newly created Olm sessions immediately
...
This fixes a bug where we would try to create a new Olm session, even if
we already created one, because we didn't yet add the new one to the
store.
This would be triggered every time two or more Olm pre-key messages
arrive that don't yet have an Olm session. This leads to decryption
failures for every message that arrived in the same sync after the
first one which created the new Olm session.
2021-08-13 18:28:52 +02:00
Damir Jelić
d27a08bc91
crypto: Fix a comment in the attachment encryption logic
2021-08-13 18:28:52 +02:00
Damir Jelić
5192feb836
crypto: Add support to request secrets
2021-08-13 18:28:52 +02:00
Damir Jelić
a916288d03
crypto: Support responding to secret requests
2021-08-13 18:28:52 +02:00
Damir Jelić
96e26651bc
crypto: Bump the olm-rs version
2021-08-13 14:07:37 +02:00
Damir Jelić
725fd817c2
Merge branch 'ruma-0.3'
2021-08-12 15:22:21 +02:00
Damir Jelić
79dd53639b
Merge branch 'set-tag'
2021-08-12 15:06:26 +02:00
Jonas Platte
578ddd2698
Upgrade to ruma 0.3.0
2021-08-12 10:41:20 +02:00
Emelie
e175ab79c7
matrix-sdk: Add helpers for room tags
2021-08-09 17:01:48 +02:00
Johannes Becker
937d0aca79
appservice: Support appservice located on sub path
2021-08-09 14:35:26 +02:00
stoically
0bd438e617
Fix clippy warnings
2021-08-05 22:48:05 +02:00
Damir Jelić
1fd1570e07
Merge branch 'wip/haeckerfelix/room-event'
2021-07-29 09:37:31 +02:00
Felix Häcker
91e9a5f9f3
Add new RoomEvent type, try to decrypt event
2021-07-28 19:49:41 +02:00
Damir Jelić
aa5f532f86
Merge branch 'master' into room-state-getters
2021-07-27 11:18:29 +02:00
Damir Jelić
c499d2e465
matris-sdk: Test getting state events out of the store
2021-07-27 10:22:11 +02:00
Damir Jelić
3d734a120d
Merge branch 'hoist-deserialize-fix'
2021-07-26 16:16:08 +02:00
Damir Jelić
05eeba067c
base: Add docs to the newly public hoist and deserialize method
2021-07-26 15:58:18 +02:00
Damir Jelić
778867e3ef
crypto: Test that edits get properly decrypted
2021-07-26 15:28:17 +02:00
Damir Jelić
4432be48e0
crypto: Fix a broken doc link
2021-07-26 11:47:53 +02:00
Felix Häcker
f3620e7072
room: Add event() method to retrieve a room event
2021-07-25 20:51:46 +02:00
Damir Jelić
46f9c292ab
crypto: Streamline how we update one-time key counts
...
There is no reason to use different logic when updating one-time key
counts coming from an upload response vs when coming from a sync
response.
Switch to an AtomicU64 for the count as well, the i64 is probably a
remnant of the SQLite based crypto store.
2021-07-22 16:06:10 +02:00
Damir Jelić
e919a82b2c
Merge branch 'verification-improvements'
2021-07-19 14:31:31 +02:00
Damir Jelić
3a8ff2f6b4
matrix-sdk: Allow the key import error to be dead under WASM
2021-07-19 11:19:14 +02:00
Damir Jelić
26310def0a
crypto: Silence a couple of clippy warnings
2021-07-19 10:49:22 +02:00
Damir Jelić
24377a45ff
matrix-sdk: Add methods to request verification for devices
2021-07-19 10:34:34 +02:00
Damir Jelić
5566886f20
crypto: Add public methods to request verifications with devices
2021-07-19 10:26:39 +02:00
Damir Jelić
8f03679935
matrix-sdk: Add more getters to the high level verification structs
2021-07-19 09:59:08 +02:00
Damir Jelić
0053d2a874
crypto: Don't send cancellations for passive verification requests
2021-07-19 09:48:22 +02:00
Damir Jelić
55a9e6836d
crypto: Introduce a CancelInfo struct
...
This replaces the separate methods to fetch info about the cancellation.
It was a bit annoying to gather all the different info where each method
can return None.
2021-07-19 09:45:47 +02:00
Damir Jelić
cf30c42563
crypto: Correctly remember our chosen SAS methods
2021-07-19 09:43:35 +02:00
Damir Jelić
ff8089912e
crypto: Only send cancellations to other devices if we're the requester
2021-07-19 09:36:21 +02:00
Damir Jelić
909cd42ac1
crypto: Cancel the verification request for to-device Sas verifications
2021-07-19 09:32:48 +02:00
Damir Jelić
7433003ffa
matrix-sdk: Don't panic when importing invalid key exports
2021-07-19 09:21:28 +02:00
Damir Jelić
ead91a1e6b
crypto: Send cancellations if the other device picks up over to-device
2021-07-12 18:12:02 +02:00
Damir Jelić
b53518d1b8
crypto: Improve a log line
2021-07-09 17:13:15 +02:00
Damir Jelić
71c89c2670
crypto: Time out verification requests as well
2021-07-09 17:01:35 +02:00
Damir Jelić
cca73b2622
crypto: Update the SAS event timeout when we receive events
2021-07-09 16:13:30 +02:00
Damir Jelić
7644ceea8a
crypto: Make sure we don't deadlock when we cancel the verification request
2021-07-09 14:31:54 +02:00
Damir Jelić
b0e8f12426
crypto: Cancel the verification request if the child flow gets cancelled
2021-07-09 13:53:47 +02:00
Damir Jelić
4e5cc03673
crypto: Only go into a done verification request if we're in the correct state
2021-07-09 11:50:12 +02:00
Damir Jelić
76d57baa11
crypto: Add the verification to the cache after we scan a QR code
2021-07-09 11:49:46 +02:00
Damir Jelić
5c9840daf8
crypto: Return a request when we start QR code verification instead of the content
2021-07-09 11:39:25 +02:00
Damir Jelić
ae37e6ec9d
crypto: Add a state getter where we scanned the QR code
2021-07-09 11:38:10 +02:00
Damir Jelić
c5df7c5356
crypto: Add methods to request verification from users
2021-07-08 12:30:30 +02:00
Sorunome
27ad1f42da
use hoist_and_deserialize for state events
2021-07-04 08:42:59 +02:00
Jonas Platte
69225ad00b
Use rustdoc-map to link to external crates in master docs
2021-07-02 18:05:34 +02:00
Damir Jelić
db0843a47a
crypto: Don't panic if we don't have the keys to generate a QR code
2021-07-01 10:27:45 +02:00
Damir Jelić
9052843acb
crypto: Add another SAS state so we know when both parties accepted
2021-06-29 12:56:28 +02:00
Damir Jelić
113587247e
crypto: Notify our users that a verification timed out on our end
2021-06-29 12:56:28 +02:00
Damir Jelić
ee6b804804
crypto: Allow QR code verifications to get into the cancelled state as well.
2021-06-29 12:56:28 +02:00
Damir Jelić
63659c9604
crypto: Fix verification requests getting cancelled
2021-06-29 12:56:28 +02:00
Damir Jelić
100a936f1b
crypto: Add a method to check if the scanning has been confirmed
2021-06-29 12:56:28 +02:00
Damir Jelić
80a30bcdd6
crypto: Add all the common accessors to the qr code verification
2021-06-29 12:56:28 +02:00
Damir Jelić
728d298810
crypto: Add a getter for the room id for the SAS verifications
2021-06-29 12:56:28 +02:00
Damir Jelić
af084528c8
crypto: Remember who cancelled the verification
...
This seems to be of limited use considering that people can just see the
sender of the cancellation event or they perform the cancellation
themselves using the cancel() method but EA seems to want this.
2021-06-29 12:56:28 +02:00
Damir Jelić
d4e80883dc
crypto: Propagate the we_started info to the SAS verification
2021-06-29 12:56:28 +02:00
Damir Jelić
55690ddd54
crypto: Allow canceling a SAS verification with a specific cancel code
2021-06-29 12:56:28 +02:00
Damir Jelić
9a685d685c
crypto: Add a couple more getters for the SAS verification
2021-06-29 12:56:28 +02:00
Damir Jelić
c78406ceb9
crypto: Clean up the method to check if a device is verified.
2021-06-29 12:56:28 +02:00
Johannes Becker
f454d407af
appservice: Drop actix
2021-06-29 12:16:48 +02:00
Jonas Platte
df71de5af2
crypto: Store key::verification::start::SasV1Content
...
… instead of SasV1ContentInit
2021-06-25 12:04:20 +02:00
Jonas Platte
52fd551890
appservice: Reexport ruma entirely
2021-06-23 16:12:23 +02:00
Jonas Platte
4d5768111d
Simplify ruma identifier imports
2021-06-23 16:12:23 +02:00
Jonas Platte
aabda60e9f
Fix unused import warnings for wasm
2021-06-23 16:12:22 +02:00
Jonas Platte
089ab20e7c
Re-format wasm_command_bot
2021-06-23 16:12:22 +02:00
Jonas Platte
6e29251886
Remove matrix_sdk_base::Error re-export
...
It's not part of the public API.
2021-06-23 16:12:22 +02:00
Jonas Platte
4a7010bab1
Reexport independent external crates entirely
...
… instead of reexporting individual items.
2021-06-23 16:12:22 +02:00
Jonas Platte
b181125e6f
Remove nesting of matrix_sdk_base::Error in matrix_sdk::Error
...
There is no useful distinction between the same error variants on
matrix_sdk::Error directly vs matrix_sdk::MatrixError.
2021-06-23 12:50:37 +02:00
Jonas Platte
c4e4830f32
Add missing doc(cfg) attrs
2021-06-23 11:52:19 +02:00
Damir Jelić
b95ebe444e
matrix-sdk: Bump our versions
CI / Check style (push) Failing after 32s
CI / Run clippy (push) Has been skipped
CI / linux / WASM (push) Has been skipped
CI / linux / appservice / stable / warp (push) Has been skipped
CI / macOS / appservice / stable / warp (push) Has been skipped
CI / linux / appservice / stable / actix (push) Has been skipped
CI / macOS / appservice / stable / actix (push) Has been skipped
CI / linux / features-markdown (push) Has been skipped
CI / linux / features-socks (push) Has been skipped
CI / linux / features-sso_login (push) Has been skipped
CI / linux / features-no-sled (push) Has been skipped
CI / linux / features-sled_cryptostore (push) Has been skipped
CI / linux / features-no-encryption-and-sled (push) Has been skipped
CI / linux / features-require_auth_for_profile_requests (push) Has been skipped
CI / linux / features-no-encryption (push) Has been skipped
CI / linux / features-rustls-tls (push) Has been skipped
CI / linux / beta (push) Has been skipped
CI / linux / stable (push) Has been skipped
CI / macOS / stable (push) Has been skipped
2021-06-22 14:57:46 +02:00
Damir Jelić
e7c7b63b6e
qrcode: Add a readme
2021-06-22 14:20:25 +02:00
Damir Jelić
cba22ae3b2
Merge branch 'upgrade-deps'
2021-06-21 20:31:57 +02:00
Damir Jelić
57b2f6ad22
matrix-sdk: Switch to a release of ruma
2021-06-21 19:53:26 +02:00
Damir Jelić
8f1d8eeca2
Merge branch '244-room-history'
2021-06-21 17:33:40 +02:00
Damir Jelić
513fbd8900
crypto: Manually implement Debug for attachment encryptors/decryptors
2021-06-21 17:29:46 +02:00
Damir Jelić
17097f4d42
matrix-sdk: Upgrade our deps
2021-06-21 16:45:52 +02:00
SaurusXI
58369fe7d0
matrix-sdk: (fix) use macro for matching in are_events_visible
2021-06-21 20:14:40 +05:30
Jonas Platte
43e213fd67
matrix-sdk: Update ruma
...
Co-authored-by: Damir Jelić <poljar@termina.org.uk >
2021-06-21 15:45:33 +02:00
SaurusXI
ae5be67322
matrix-sdk: (fix) return Ok(()) in ensure_members when returning early
2021-06-21 18:28:11 +05:30
SaurusXI
b984fcca0c
matrix-sdk: (fix) correct the history visibility states that allow us to view events in are_events_visible
2021-06-21 18:08:38 +05:30
Felix Häcker
bdd35206e8
event_handler: Add AnySyncMessageEvent::Reaction
2021-06-20 17:04:31 +02:00
SaurusXI
0e84349d05
matrix-sdk: add event visibility check to ensure_members
2021-06-20 13:03:50 +05:30
SaurusXI
092ca90403
matrix-sdk: add method to check room's event visibility
2021-06-20 13:01:24 +05:30
Fisher Darling
4cc7237db3
remove getting every state event and add getters to room
2021-06-17 23:34:26 -06:00
Damir Jelić
0fb3dedd1c
client: Fix compilation when the encryption feature is disabled
2021-06-17 12:35:37 +02:00
Damir Jelić
3cf843d24f
matrix-sdk: Rework the public API for answering verifications
2021-06-17 12:17:11 +02:00
Damir Jelić
baee5b2d11
crytpo: Couple more accessors for the verification request
2021-06-17 11:04:18 +02:00
Damir Jelić
34703bc0d6
crypto: Add a method to get all verification requests of a certain user
2021-06-17 11:04:18 +02:00
Damir Jelić
d212e7df18
crypto: Add some more accessors to the verification requests
2021-06-17 11:04:18 +02:00
Damir Jelić
f8b09d4537
crypto: Remember who started the verification request
2021-06-17 11:04:18 +02:00
Damir Jelić
5d38bc3802
crypto: Scope the verification requests behind the other user id
2021-06-17 11:04:18 +02:00
Damir Jelić
58d3b42a60
crypto: Don't allow QR code generation if we or the other can't handle it
2021-06-17 11:04:18 +02:00
Damir Jelić
b7986a5153
crypto: Add a couple more accessors for the verification request
2021-06-17 11:04:18 +02:00
Damir Jelić
c547f384bc
crypto: Fix the method to transition from a request into a SAS verification
2021-06-17 11:04:18 +02:00
Damir Jelić
29bba0b2ca
crypto: Allow accepting key request while specifying our supported methods
2021-06-17 11:04:18 +02:00
Damir Jelić
80fac4bfa4
cyrpto: Go into passive mode if someone else replies to a request
2021-06-17 11:04:18 +02:00
Damir Jelić
be53913a16
crypto: Remove the redundant flow id copy
2021-06-17 11:04:18 +02:00
Damir Jelić
df1fe0ebc4
crypto: Don't return a result when receiving a ready event
...
Ready events might be invalid but we might receive a valid one later on,
e.g. someone is trying to disrupt our verification, so just ignore
invalid ready events.
2021-06-17 11:04:18 +02:00
Damir Jelić
073b91fa62
crypto: Ignore verification requests that are sent by us
2021-06-17 11:04:18 +02:00
Damir Jelić
cc0388929a
crypto: Add some more accessors for the fields in the verification types
2021-06-17 11:04:17 +02:00
Damir Jelić
b14d754aed
crypto: Turn the content_to_request function into a constructor
...
Closes : #260
2021-06-17 11:04:17 +02:00
Damir Jelić
00c3921d2a
crypto: Add initial support for QR code verification
2021-06-17 11:04:17 +02:00
Damir Jelić
71aba433da
crypto: Add some more accessors to the sas structs
2021-06-17 11:04:17 +02:00
Damir Jelić
1c8081533d
qrcode: Rename the main qrcode type
2021-06-17 11:04:17 +02:00
Damir Jelić
7f364fd615
crypto: Allow only a identity to be verified when the verification finishes
...
QR code based verification doesn't verify a device when users are
verifying each other, generalize the logic that marks stuff as verified
so we can verify either only a device or an user identity or both.
2021-06-17 11:04:17 +02:00
Damir Jelić
ada71586ac
crypto: Scope the verifications per sender
2021-06-17 11:04:17 +02:00
Damir Jelić
533a5b92b0
crypto: Ignore key verification requests that have an invalid timestamp
2021-06-17 11:04:17 +02:00
Damir Jelić
c4b1d3bc44
Merge branch 'avatar_cache'
2021-06-17 10:42:57 +02:00
Julian Sparber
4cdb03e64b
matrix-sdk: use media cache for avatar requests
2021-06-15 13:07:34 +02:00
Johannes Becker
da4876acee
appservice: Rename Appservice to AppService
2021-06-15 12:09:25 +02:00
Fisher Darling
cb6269d5ec
add more state event getters to store
2021-06-14 20:59:53 -06:00
Damir Jelić
dbf8cf231d
Merge branch 'matrix-sdk/feat/whoami'
2021-06-11 10:08:12 +02:00
Johannes Becker
ba0cc3d45f
matrix-sdk: Add Client::whoami()
2021-06-11 09:37:30 +02:00
Johannes Becker
1a5cd544e7
appservice: Introduce appservice mode on Client
2021-06-10 11:36:20 +02:00
Johannes Becker
97c7baab14
appservice: Rename example to get rid of cargo warning
2021-06-10 11:22:01 +02:00
Johannes Becker
df42ef68a2
appservice: Enable warp by default
2021-06-09 22:14:41 +02:00
Damir Jelić
4a83e36195
Merge branch 'appservice/feature/warp'
2021-06-09 17:31:07 +02:00
Johannes Becker
da673f1308
appservice: Temporarily remove windows from CI
...
because it's broken
2021-06-08 11:29:14 +02:00
Johannes Becker
c634efbe09
appservice: Fixes after rebase
2021-06-08 11:18:56 +02:00
Damir Jelić
5fa2b05622
matrix-sdk: Fix some more typos
2021-06-08 11:13:23 +02:00
Johannes Becker
66551d28e4
appservice: Switch autojoin example to warp
2021-06-08 11:09:05 +02:00
Johannes Becker
7116fc1103
appservice: Switch warp to git dep so it works OOTB
2021-06-08 11:09:05 +02:00
Johannes Becker
d8b23f789d
appservice: Expand set_event_handler docs
2021-06-08 11:09:05 +02:00
Johannes Becker
4dacef2e2c
appservice: Improve warp_filter
2021-06-08 11:09:05 +02:00
Johannes Becker
d6ca3a27bb
appservice: Properly scope webserver configuration
2021-06-08 11:09:05 +02:00
Johannes Becker
8d061447d6
appservice: Improve test coverage
2021-06-08 11:09:03 +02:00
Johannes Becker
38512d6a54
appservice: Add warp support
2021-06-08 11:01:20 +02:00
Johannes Becker
f3bbcf553c
appservice: Restructure tests
2021-06-08 10:58:07 +02:00
Jonas Platte
e1d905fbc6
Temporarily remove Windows from CI
...
It's currently broken.
2021-06-07 19:50:14 +02:00
Jonas Platte
1168c39c20
Move ruma re-export from matrix-sdk-common to matrix-sdk
2021-06-07 19:50:14 +02:00
Jonas Platte
54063513a3
appservice: Depend on ruma directly
2021-06-07 19:50:14 +02:00
Jonas Platte
26788f83f0
sdk: Depend on ruma directly
2021-06-07 19:50:13 +02:00
Jonas Platte
c705af1048
test: Depend on ruma directly
2021-06-07 18:55:56 +02:00
Jonas Platte
c964589049
base: Depend on ruma directly
2021-06-07 18:55:56 +02:00
Jonas Platte
74d0ac7c77
crypto: Depend on ruma directly
...
… instead of using matrix_sdk_common's re-exports
2021-06-07 18:55:56 +02:00
Jonas Platte
3bac536daf
Fix clippy lints
...
Automated via `cargo clippy --workspace --all-targets -Zunstable-options --fix`.
2021-06-07 15:51:18 +02:00
Jonas Platte
e18f248dbb
crypto: Add missing required-features to crypto_bench
2021-06-07 15:16:53 +02:00
Damir Jelić
b6c7b317bf
Merge branch 'qr-crate'
2021-06-07 14:03:29 +02:00
Damir Jelić
6f11244017
Merge branch 'typos'
2021-06-06 21:01:30 +02:00
Jonas Platte
6b685b671d
Replace Arc<Box<dyn (Crypto|State)Store>> by Arc<dyn (Crypto|State)Store>
2021-06-06 18:16:25 +02:00
Jonas Platte
eed2b37885
Replace Arc<Box<DeviceId>> by Arc<DeviceId>
2021-06-06 18:15:18 +02:00
Jonathan de Jong
f76cb1d123
the the
2021-06-05 14:55:01 +02:00
Jonathan de Jong
f36fb55727
some more typos
2021-06-05 14:50:08 +02:00
Jonathan de Jong
74a6d39b9f
various typos
2021-06-05 14:35:20 +02:00
Damir Jelić
0df782e93e
crypto: Fix some clippy warnings
2021-06-04 19:26:32 +02:00
Damir Jelić
7cca358399
Merge branch 'master' into verification-improvements
2021-06-04 18:37:42 +02:00
Damir Jelić
96d4566111
crypto: Move the verification cache into a separate module
2021-06-04 18:13:52 +02:00
Damir Jelić
31e00eb434
crypto: Don't panic if we get a unknown cancel code
2021-06-04 18:13:52 +02:00
Damir Jelić
612fa46359
crypto: Replace a bunch of From implementations with macros
2021-06-04 18:13:52 +02:00
Damir Jelić
0a7fb2cbc3
crytpo: Mark verification requests as cancelled and as done
2021-06-04 18:13:52 +02:00
Damir Jelić
f9fb530480
crypto: Forward cancel events to the sas object
2021-06-04 18:13:52 +02:00
Damir Jelić
2ec8893273
crypto: Silence a clippy warning until we add QR code verifications
2021-06-04 15:39:56 +02:00
Damir Jelić
bd5dda370d
crypto: Remove the sas event enums module
2021-06-04 15:16:38 +02:00
Damir Jelić
ac04b0c36e
crypto: Create a enum for the verification types
2021-06-04 15:16:38 +02:00
Damir Jelić
a04afac963
crypto: Fix a clippy warning
2021-06-04 15:16:38 +02:00
Damir Jelić
cf98681f19
crypto: Remove some duplicate code
2021-06-04 15:16:38 +02:00
Damir Jelić
cbcf673d21
crypto: Make sure we send verification done events
2021-06-04 15:16:38 +02:00
Damir Jelić
9b20b00908
crypto: Log if we get a missmatch of the flow id
2021-06-04 15:16:38 +02:00
Damir Jelić
f50d0cd3a6
crypto: Test starting a to-device verification request
2021-06-04 15:16:38 +02:00
Damir Jelić
1e48b15040
crypto: Add enums so we can handle in-room and to-device verifications the same
2021-06-04 15:16:38 +02:00
Damir Jelić
b52f3fb11f
crypto: Remove an allocation when calculating the SAS MAC
2021-06-04 15:16:38 +02:00
Damir Jelić
d877c1cf8c
crypto: Move the Done state into the common verification module
2021-06-04 15:16:38 +02:00
Damir Jelić
327445c6a0
crypto: Move the logic for marking identities as verified out of the Sas struct
2021-06-04 15:16:38 +02:00
Damir Jelić
8a5a0e511e
crypto: Don't await while holding a sync lock
2021-06-04 15:16:38 +02:00
Damir Jelić
12619ab8b3
crypto: Log a warning if we get a start event without being ready
2021-06-04 15:16:38 +02:00
Damir Jelić
069ef3a661
crypto: Move the SAS starting logic into the verification request struct
2021-06-04 15:16:38 +02:00
Damir Jelić
999f0899f8
crypto: Move the outgoing requests to the VerificationCache
2021-06-04 15:16:38 +02:00
Damir Jelić
681f32b0a7
crypto: Fix a couple of typos
2021-06-04 15:16:38 +02:00
Damir Jelić
0e514b755f
crypto: Move the CancelContent generation out of the sas module
2021-06-04 15:16:38 +02:00
Johannes Becker
c0b30cadc9
appservice: Improve API
2021-06-01 10:48:01 +02:00
Damir Jelić
ee40d917d1
Merge branch 'feat/appservice-client-config'
2021-05-31 13:28:31 +02:00
Johannes Becker
3f2fecd309
appservice: Add new_with_client_config
2021-05-31 12:50:53 +02:00
Damir Jelić
d58a190712
Merge branch 'media-store'
2021-05-31 10:36:20 +02:00
Damir Jelić
3c72304e36
Merge branch 'patch-1'
2021-05-31 09:39:07 +02:00
Damir Jelić
10b38ce44e
matrix-sdk: Fix a bunch of typos
2021-05-31 09:35:19 +02:00
Jonas Platte
3c9f929598
Fix typo: underlaying => underlying
2021-05-30 15:01:27 +02:00
L3af
d7e167498d
docs: fix on_room_join_rules
2021-05-29 04:31:25 +00:00
Kévin Commaille
a959116af2
sdk: Fix clippy warnings
2021-05-28 09:11:48 +02:00
Damir Jelić
63dc939081
matrix-qrcode: Modify the QR code generation so mobile clients can decode
2021-05-27 11:24:44 +02:00
Johannes Becker
2becb88c35
appservice: Add client_with_config singleton
2021-05-26 18:12:50 +02:00
Kévin Commaille
6367cdddbf
sdk: Add tests for media content
2021-05-25 22:15:27 +02:00
Kévin Commaille
5e05b37d02
base: Add tests for media content storage
2021-05-25 22:10:04 +02:00
Kévin Commaille
df883d3328
Add MediaEventContent trait and implement it for corresponding room events
...
Add helper methods in Client
2021-05-25 21:52:27 +02:00
Kévin Commaille
b805670c8a
sdk: Add methods for media content
2021-05-25 21:43:01 +02:00
Kévin Commaille
0c8e870bff
crypto: Implement From<EncryptedFile> for EncryptionInfo
2021-05-25 21:33:38 +02:00
Kévin Commaille
c318a6e847
base: Add media store
2021-05-25 21:16:28 +02:00
Damir Jelić
bdd51a323a
Merge branch 'read-receipts'
2021-05-25 19:25:48 +02:00
Kévin Commaille
f619bbb884
base: Change receipt store tests' user ID
2021-05-25 14:20:13 +02:00
Damir Jelić
37c23f1761
matrix-qrcode: Add accessors for our keys/secrets.
2021-05-25 13:31:12 +02:00
Kévin Commaille
49c72e74f7
base: Add store tests for receipts
2021-05-25 11:57:03 +02:00
Johannes Becker
7609c7445c
matrix-sdk: Allow to get Client's RequestConfig
2021-05-25 10:38:43 +02:00
Kévin Commaille
a889bb3aca
base: Simplify decode_key_value
2021-05-25 10:26:56 +02:00
Johannes Becker
20454e1666
appservice: Put registration into Arc
2021-05-25 10:05:51 +02:00
Johannes Becker
aaa17535ac
matrix_sdk: Fix typo
2021-05-25 10:05:51 +02:00
Johannes Becker
bd5e112a46
appservice: Remove outdated serde_yaml dependency
2021-05-25 10:05:51 +02:00
Johannes Becker
cc591cce1c
appservice: Improve docs
2021-05-25 10:05:51 +02:00
Damir Jelić
e058191b99
base: Correctly update the room info for invited rooms
2021-05-25 09:31:32 +02:00
Damir Jelić
300189bb37
crypto: Use the verification cache in verification requests
2021-05-24 16:41:27 +02:00
Damir Jelić
d928f39f68
crypto: Add a VerificationCache struct
2021-05-24 16:41:27 +02:00
Damir Jelić
98c259dc1e
crypto: Refactor the VerificationReqest struct a bit
2021-05-24 16:41:27 +02:00
Damir Jelić
c174c4fda2
matrix-qrcode: Rename the crate.
2021-05-24 16:38:21 +02:00
Damir Jelić
7a5daf6ac7
Merge branch 'famous'
2021-05-24 12:47:14 +02:00
timorl
ded5830deb
Make client use .well-known redirects
...
Was supposed to fix #219 , but apparently that was about something else.
2021-05-24 11:00:42 +02:00
Austin Ray
59c8652ce8
base: fix empty room name calculation
...
Step 3.iii of the naming algorithm[0] covers name calculation for empty
rooms; however, it isn't an else condition for steps 3.i and 3.ii. It's a
final conditional in the algorithm before returning the name. The
current implementation treats it as an else condition.
To fix this, use step 3.i and 3.ii to calculate a room name then check
if the user is alone. If alone, return "Empty room (was...)" containing
any former member names. If alone and there aren't any former members,
return "Empty room"
Fixes #133
[0] https://matrix.org/docs/spec/client_server/latest#calculating-the-display-name-for-a-room
2021-05-21 19:18:11 -04:00
Austin Ray
5670700f7f
base: fix room name's "and {} others" count
...
The current implementation uses number of invited and joined members for
"and {} others" message. This assigns rooms with 5 members the name "a,
b, c, and 5 others" suggesting 8 room members. The correct message is
"a, b, c, and 2 others". To get this, subtract number of heroes from
invited and joined member count.
Step 3.ii of the naming algorithm[0] confirms using a remaining users
count in the name.
[0] https://matrix.org/docs/spec/client_server/latest#calculating-the-display-name-for-a-room
2021-05-21 18:48:19 -04:00
Austin Ray
79025e3f40
base: split calculate_room_name()
...
Split `calculate_room_name()` into a high-level function using Matrix
data types and low-level function containing the core logic using plain
Rust data types. Since the low-level function uses simple data types,
unit testing becomes easier.
2021-05-21 17:25:59 -04:00
Austin Ray
c90e8ab483
base: use correct bound in naming algorithm
...
Step 3.ii of the name calculation algorithm[0] specifies the conditional
as `heroes < invited + joined - 1 AND invited + joined > 1`. However,
current implementation uses `invited + joined - 1 > 1` in the
conditional, which can trigger the conditional if the user is alone.
Correct this by using two variables representing `invited + joined` and
`invited_joined - 1` and updating the conditional. `invited + joined` is
kept as a variable since step 3.iii uses it for its conditional.
[0] https://matrix.org/docs/spec/client_server/latest#calculating-the-display-name-for-a-room
2021-05-21 14:51:59 -04:00
Kévin Commaille
64b5298881
base: Add support for read receipts
2021-05-20 17:14:57 +02:00
Damir Jelić
8018b43443
qrcode: Document the qrcode crate.
2021-05-20 15:02:14 +02:00
Damir Jelić
f49f5f1636
qrcode: Add some more tests
2021-05-20 14:04:40 +02:00
Damir Jelić
b073323089
qrcode: Add another TryFrom implementation
2021-05-20 14:04:07 +02:00
Damir Jelić
305766955b
matrix-sdk: Add a crate to generate and parse QR codes
...
This patch adds types and methods to parse QR codes defined in the
[spec]. It supports parsing the QR format from an image or from a byte
string, converting back to an image and bytestring is possible as well.
[spec]: https://spec.matrix.org/unstable/client-server-api/#qr-code-format
2021-05-19 16:10:48 +02:00
Damir Jelić
110b8eb8dd
Merge branch 'master' into sas-longer-flow
2021-05-18 09:07:50 +02:00
Damir Jelić
fe17dce813
Merge branch 'ProjectMoon/master'
2021-05-18 08:53:31 +02:00
Damir Jelić
c122549e0d
base: Correctly get the user ids of all room members
2021-05-18 08:29:10 +02:00
projectmoon
bb69901d94
Return joined members in a room from the correct Sled tree.
2021-05-17 22:28:30 +00:00
Jonas Platte
cd77441d1b
Upgrade ruma to 0.1.0 (crates.io release)
2021-05-17 02:57:36 +02:00
Jonas Platte
5059d8b2c6
Remove unused import
2021-05-17 02:21:18 +02:00
Jonas Platte
ffea84b64a
Use Instant instead of SystemTime to measure elapsed time
2021-05-15 17:23:31 +02:00
Jonas Platte
15540e84e3
Upgrade ruma
2021-05-15 17:22:32 +02:00
Johannes Becker
0bdcc0fbf9
appservice: Refactor API
2021-05-13 17:42:06 +02:00
Damir Jelić
3f57a2a9f2
Merge branch 'master' into sas-longer-flow
2021-05-13 11:26:40 +02:00
Damir Jelić
09a7858702
crypto: Initial support for the longer to-device verification flow
2021-05-13 11:15:56 +02:00
Damir Jelić
ec55258be9
crypto: Handle decrypted to-device events as well
...
Usually only room keys and forwarded room keys are sent as encrypted
to-device events, those are specially handled to avoid accepting room
keys coming in unencrypted.
Some clients might send out other events encrypted which might lower
metadata leakage and the spec doesn't disallow it.
This patch handles decrypted events the same way as non-encrypted ones,
we're still special casing the decryption handling to avoid decryption
loops/bombs (i.e. events that are encrypted multiple times).
2021-05-13 11:08:13 +02:00
Devin Ragotzy
6b600d7e6d
Replace async_trait rustfmt removed
2021-05-12 20:34:14 -04:00
Devin Ragotzy
5f09d091cb
Add cargo fmt to ci using nightly
2021-05-12 15:38:59 -04:00
Devin Ragotzy
2ef0c2959c
Add use_small_heuristics option and run fmt
2021-05-12 15:37:29 -04:00
Devin Ragotzy
c85f4d4f0c
Add rustfmt config file and run over workspace
2021-05-12 15:36:52 -04:00
Damir Jelić
4f7902d6f0
crypto: Add a method to check it the SAS flow supports emoji
2021-05-12 20:09:02 +02:00
Damir Jelić
9863bc4a1c
matrix-sdk: Fix a clippy warning
2021-05-12 19:45:23 +02:00
Damir Jelić
77c2a4ed4f
matrix-sdk: Bump ruma
2021-05-12 19:19:42 +02:00
Damir Jelić
4c09c6272b
Merge branch 'feat/appservice'
2021-05-11 09:50:26 +02:00
Damir Jelić
da57061db0
Merge branch 'tags'
2021-05-10 13:27:30 +02:00
Johannes Becker
753302394f
appservice: Remove outdated error
2021-05-10 12:08:04 +02:00
Johannes Becker
a2125adeee
ci: Dedicated matrix-sdk-appservice pipeline
2021-05-10 09:56:33 +02:00
Johannes Becker
14bc4eb7e0
appservice: Rename verify_hs_token to hs_token_matches
2021-05-10 09:11:15 +02:00
Johannes Becker
325531d13f
appservice: Compile time webserver feature check
2021-05-10 09:04:51 +02:00
Johannes Becker
87099676f9
appservice: Improve docs
2021-05-10 08:43:06 +02:00
Johannes Becker
3b24d33822
appservice: Rely on cfg-toggle in send_request
2021-05-10 07:56:00 +02:00
Johannes Becker
eece920953
appservice: Initial version
2021-05-10 07:51:52 +02:00
Jonas Platte
44eff7deb7
Add a general-purpose API error variant to HttpError
2021-05-08 15:01:02 +02:00
Jonas Platte
68b74c5ea9
Rename HttpError::{FromHttpResponse => ClientApi}
2021-05-08 14:49:42 +02:00
Jonas Platte
efe5b1e538
Bump ruma
2021-05-08 14:49:15 +02:00
Kévin Commaille
a2ab6a9f23
base: Get the tags for a room
2021-05-07 19:11:27 +02:00
Damir Jelić
1bda3659ce
sas: Allow to just get the emoji index instead of the emoji and descryption
2021-05-07 17:04:27 +02:00
Damir Jelić
80d01b23c4
sas: Return an array of seven emojis instead of a vector
2021-05-07 17:01:53 +02:00
Damir Jelić
dea3d4cb68
sas: Implement a missing todo, allow accepting in-room verifications.
...
Technically that's not needed since we auto-accept here after we
accepted the request but we still need to remove the TODO there.
2021-05-07 16:57:52 +02:00
Kévin Commaille
b8017b1fb0
bump ruma to 24154195a00390a33542603b968e94022487587c
2021-05-07 13:22:32 +02:00
Damir Jelić
8dbbacfbe6
client: Add a method to get the ed25519 key of our own device
2021-05-06 21:44:50 +02:00
Damir Jelić
43b7072609
matrix-sdk: Fix some newly introduced clippy warnings
2021-05-06 20:42:27 +02:00
Damir Jelić
cad888e69b
client: Remove a now unneeded workaround for UIA
2021-05-06 19:18:22 +02:00
Damir Jelić
5df9ae350c
client: Require a proper Url to create a client
2021-05-06 09:58:21 +02:00
Damir Jelić
d90e112c06
Merge branch 'encryption-info-v2'
2021-04-29 16:54:14 +02:00
poljar
6048a1a507
crypto: Fix a typo
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com >
2021-04-29 15:34:53 +02:00
poljar
233c4355d8
crypto: Use encryption info in the docstring for the type of the same name
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com >
2021-04-29 15:34:39 +02:00
poljar
e71cabc8f0
crypto: Fix a typo.
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com >
2021-04-29 15:34:04 +02:00
poljar
22b333a0d9
Use as_str() to get the string event type.
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com >
2021-04-29 15:33:45 +02:00
Damir Jelić
c720abfa87
base: Fix the wasm example
2021-04-29 12:46:21 +02:00
Damir Jelić
5d73dd7da7
room: Add methods to get members that don't do any requests
...
Our main methods to get members nowadays ensure that the member list is
synchronized with the server. This is nice and convenient but might not
be desirable for a couple of reasons.
Firstly it might be costly to fetch all members at once depending on
what the client is doing and the number of rooms and secondly some
clients might have a hybrid setup where not everything is running on a
tokio thread, sending out requests is only possible on a tokio thread.
2021-04-29 12:38:07 +02:00
Damir Jelić
5cf0fd2b85
room: Override the method to get a specific room member
2021-04-29 11:08:09 +02:00
Damir Jelić
b3cf2c5899
base: Fix a clippy warning if the encryption feature is turned off
2021-04-29 10:46:47 +02:00
Damir Jelić
4fc21a8860
base: Store the raw versions of events in the state store
...
This patch changes the way we store and load the majority of events that
are in the state store. This is done so custom fields in the event
aren't lost since a deserialize/serialize cycle removes all the unknown
fields from the event.
2021-04-29 10:35:54 +02:00
Damir Jelić
cff90b1480
matrix-sdk: Add encryption info to our sync events.
2021-04-29 10:35:54 +02:00
Damir Jelić
5ed0c7a7b3
Merge branch 'notifications'
2021-04-28 10:30:06 +02:00
Kévin Commaille
0e2017e537
matrix-sdk: Fix clippy warning
2021-04-27 14:37:43 +02:00
Kévin Commaille
1cc4f953b3
matrix-sdk: Small fixes
2021-04-27 13:47:07 +02:00
Kévin Commaille
f8bc9f3dc9
matrix-sdk: handle overflow in active_members_count
2021-04-27 13:47:06 +02:00
Kévin Commaille
24e96df7ea
matrix-sdk: Propagate store error in get_push_rules
2021-04-27 13:47:06 +02:00
Kévin Commaille
c569436ba4
matrix-sdk: Add StateChanges::add_notification
2021-04-27 13:47:06 +02:00
Kévin Commaille
f6c4fdde7d
matrix-sdk: Implement EncodeKey for EventType
2021-04-27 13:47:06 +02:00
Kévin Commaille
3f2c5d22b6
matrix-sdk: Get notifications locally on sync
2021-04-27 13:46:56 +02:00
Jonas Platte
bd02ff901f
Avoid needless copies by changing http::Request<Vec<u8>> to http::Request<Bytes>
2021-04-26 17:31:27 +02:00
Johannes Becker
242d46c9a1
matrix-sdk: require_auth_for_profile_requests feature and force_auth request config
...
forces authentication for `get_avatar` which was previously done with
the unstable-synapse-quirks feature in ruma
2021-04-26 17:31:25 +02:00
Johannes Becker
5c882f89e8
chore: bump ruma
2021-04-26 08:05:58 +02:00
Damir Jelić
ab180362c9
Merge branch 'json-sync-builder'
2021-04-23 15:38:00 +02:00
Johannes Becker
28ddb9b70b
ci: clippy check without default features
2021-04-23 10:42:12 +02:00
Johannes Becker
910a45b3d5
chore: cleanup clippy warnings
2021-04-23 10:38:49 +02:00
Damir Jelić
a1c0acbd0c
test: Add a method to build a sync response as a JsonValue
2021-04-21 16:12:05 +02:00
Damir Jelić
a7c2a645aa
rooms: Override the joined_members() method so we return the correct RoomMember
2021-04-21 15:47:44 +02:00
Damir Jelić
2a5ede9e1a
client: Better docs for the get_or_upload_filter() method
2021-04-21 15:08:36 +02:00
Damir Jelić
324a0aafca
Merge branch 'key-share-improvements'
2021-04-21 13:47:02 +02:00
Damir Jelić
bfc7434f7e
crypto: Move the outbound session filter logic into the group session cache
2021-04-20 13:35:47 +02:00
poljar
e15f7264dc
crypto: Don't borrow inside a format unnecessarily
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com >
2021-04-20 12:27:56 +02:00
Damir Jelić
4a7be13961
crypto: Only send out automatic key requests if we have a verified device
...
Sending out automatic key requests is a bit spammy for new logins,
they'll likely have many undecryptable events upon an initial sync.
It's unlikely that anyone will respond to such a key request since keys are
shared only with verified devices between devices of the same user or if
the key owner knows that the device should have received the key.
Upon initial sync it's unlikely that we have been verified and the key
owner likely did not intend to send us the key since we just created the
new device.
2021-04-20 11:47:11 +02:00
Damir Jelić
65d84c111b
Merge branch 'exhaustive-sync-events-conv'
2021-04-19 15:05:52 +02:00
Damir Jelić
78b7dcac61
crypto: Add a public method to request and re-request keys.
2021-04-19 15:00:21 +02:00
Jonas Platte
796354ce5d
Ensure exhaustiveness for sync_events::Response destructuring
...
So the SDKs own SyncResponse type doesn't get out-of-sync.
2021-04-19 13:42:16 +02:00
Johannes Becker
95421f1713
matrix-sdk!: send_request returns Bytes
...
Prevents unnecessary copy
2021-04-19 12:26:10 +02:00
Jonas Platte
1578067498
Only activate the client parts of ruma-client-api
...
… to reduce compile times.
2021-04-19 12:23:09 +02:00
Jonas Platte
401cf282a7
Upgrade ruma dependency
2021-04-19 12:16:13 +02:00
Johannes Becker
3414a59b91
chore: bump ruma
2021-04-16 12:45:21 +02:00
Damir Jelić
8c007510cd
crypto: Only load the outgoing key requests when we want to send them out
2021-04-15 19:40:24 +02:00
Damir Jelić
f9d290746c
crypto: Load unsent outgoing key requests when we open a store
2021-04-15 17:48:37 +02:00
Damir Jelić
d4c56cc5b3
crypto: Refactor the outobund group session storing
...
This introduces a group session cache struct that can be shared between
components that need to access the currently active group session.
2021-04-15 15:19:21 +02:00
Damir Jelić
9e817a623b
crypto: Fix an invalid assert in the crypto bench
2021-04-15 15:01:56 +02:00
Damir Jelić
02331fa325
crypto: Add specialized methods to store outgoing key requests
2021-04-15 13:28:50 +02:00
Damir Jelić
5637ca3080
crypto: Simplify the should_share_session method
2021-04-15 13:28:50 +02:00
Damir Jelić
975f9a0b41
crypto: Improve the way we decide if we honor room key requests
...
This improves two things, use the correct outbound session to check if
the session should be shared.
Check first if the session has been shared if there isn't a session or
it hasn't been shared check if the request is comming from our own user.
2021-04-14 14:30:53 +02:00
Damir Jelić
4713af6aac
crypto: Fix a typo
2021-04-14 11:14:59 +02:00
Damir Jelić
ba81c2460c
crypto: Ignore key requests from ourselves
2021-04-13 17:17:09 +02:00
Damir Jelić
5132971558
crypto: Add a progress listener for key imports
2021-04-13 12:47:22 +02:00
Johannes Becker
53b1845cbe
ci: test features
2021-04-12 21:05:07 +02:00
Damir Jelić
893a5109ce
crypto: Remove some unneeded parenthesis
2021-04-12 19:11:03 +02:00
Damir Jelić
a97b01f3ce
Merge branch 'matrix-sdk/fix-no-encryption-build'
2021-04-12 19:09:32 +02:00
Johannes Becker
be72c53d3e
matrix-sdk: fix building without encryption feature
2021-04-12 17:45:58 +02:00
Damir Jelić
b4b897dd51
crypto: Await the group session invalidation
2021-04-12 15:19:30 +02:00
Damir Jelić
cb58c499b3
crypto: Store that our outbound session was invalidated
2021-04-12 13:47:38 +02:00
Kévin Commaille
ebcb2024d1
Fix docs wording
2021-04-11 16:39:49 +02:00
Kévin Commaille
dadd2fa68c
Bump ruma to e2728a70812412aade9322f6ad832731978a4240
2021-04-11 12:04:53 +02:00
Julian Sparber
b5de203499
matrix-sdk: Add RequestConfig that replaces timeout for requests
...
This exposes the retry behavior to the developer. This way the user can
set if a request should be retried or failed immidiatly.
This also make sure that the timeout set by the user is used for all
requests. Of-course it can't be used for uploaded and syncs with
timeout, but this doesn't change the behavior for those requests.
2021-04-07 10:35:31 +02:00
Damir Jelić
98ee4a3bca
Merge branch 'fix_register_error'
2021-04-07 10:11:03 +02:00
Damir Jelić
fdb1e3482e
Merge branch 'bump-ruma'
2021-04-06 12:44:33 +02:00
Damir Jelić
999c99107d
Merge branch 'room_member'
2021-04-06 12:20:04 +02:00
Kévin Commaille
7c34ac4e82
Bump ruma to 2f1b9f097930bf7908ca539f2ab7bb0ccf5d8b25
...
Use MxcUri instead of String for media URLs.
Fix wrong MXC URIs in tests.
Remove method parse_mxc no longer useful.
Apply new non-exhaustive types: CrossSigningKey, OneTimeKey and SignedKey.
Apply endpoint name change: send_state_event_for_key to send_state_event
2021-04-05 19:49:55 +02:00
Julian Sparber
e72f4cee59
matrix-sdk: Add RoomMember
2021-04-02 20:39:50 +02:00
Julian Sparber
50423786f7
matrix-sdk: Fix register_error test
2021-04-02 12:13:56 +02:00
Jonas Platte
79eb07f717
Allow Result aliases to be used with two type parameters
2021-04-01 19:35:09 +02:00
Damir Jelić
ff683602f2
crypto: Export the KeysExport error
2021-03-30 13:52:57 +02:00
Damir Jelić
74274e6dcb
base: Allow the test target to be compiled on WASM
2021-03-30 13:05:45 +02:00
Damir Jelić
02b44ca9ba
matrix-sdk: Fix or silence a bunch of new clippy warnings
2021-03-30 13:05:13 +02:00
Julian Sparber
84b187ec12
matrix-sdk: Add function to get room avatar
2021-03-25 15:01:41 +01:00
Julian Sparber
d35e730052
matrix-sdk: Add function to get users avatar
2021-03-25 15:01:41 +01:00
Damir Jelić
ef6e481860
Merge branch 'client-sso'
2021-03-23 16:12:24 +01:00
Kévin Commaille
8679e81555
client: Add login_with_sso
2021-03-23 15:30:40 +01:00
Kévin Commaille
6f59e895b6
client: Add login_with_token
2021-03-23 15:17:12 +01:00
Kévin Commaille
8a96b2c062
client: Add get_sso_login_url
2021-03-23 14:47:15 +01:00
Damir Jelić
ce4b809072
matrix-sdk: Don't ignore the accept_with_settings() Sas example
2021-03-23 14:30:31 +01:00
Damir Jelić
e92b97eff6
matrix-sdk: Fix the example for the room_send() method
2021-03-23 14:29:26 +01:00
Kévin Commaille
51d915a181
client: Add get_login_types
2021-03-23 14:27:55 +01:00
Damir Jelić
9d0085d4dd
matrix-sdk: Add the Client level room send method back
2021-03-23 14:00:20 +01:00
Damir Jelić
35c7ae665d
CI: Install Emsripten
2021-03-23 12:43:38 +01:00
Damir Jelić
97385255d4
CI: Change the dir take three
2021-03-23 12:31:17 +01:00
Damir Jelić
cf90a18f13
CI: Change the directory take two
2021-03-23 12:26:46 +01:00
Damir Jelić
a9c37ba2d0
CI: Install the WASM target for the WASM check
2021-03-23 12:11:05 +01:00
Damir Jelić
957bca1a14
CI: Add the missing runs-on definition
2021-03-23 12:02:32 +01:00
Damir Jelić
f0f6012871
CI: check if the WASM example compiles
2021-03-23 11:56:43 +01:00
Damir Jelić
15d5b234ed
Merge branch 'multithreaded-crypto'
2021-03-23 11:34:07 +01:00
Damir Jelić
50d7e09347
commmon: Document the executor module
2021-03-23 11:33:14 +01:00
Damir Jelić
12bf0f53a8
matrix-sdk: Fix the WASM example
2021-03-23 10:18:55 +01:00
Damir Jelić
bbe812f1d9
common: Add a executor abstraction so we can spawn tasks under WASM
2021-03-23 10:18:55 +01:00
Kévin Commaille
dc74bc6116
bump ruma to 92ee92ad7eb90b3c80abbd7eb116d886c79bf4fd
2021-03-18 11:40:53 +01:00
Julian Sparber
382ec01bc3
move matrix_sdk_base::EventHandler to matrix_sdk
2021-03-17 15:29:26 +01:00
Damir Jelić
e9dff24ba7
Merge branch 'add_room_enum'
2021-03-17 15:08:02 +01:00
Julian Sparber
19cacb1f26
matrix-sdk: Add room::State enum
...
This enum contains the room in the Joined, Left and Invited state.
2021-03-17 13:08:31 +01:00
Julian Sparber
5d66ff475f
matrix-sdk: Reexport matrix_sdk_base::Room as BaseRoom
2021-03-17 12:17:37 +01:00
Damir Jelić
9aad775f01
Merge branch 'lock_requests'
2021-03-16 17:01:04 +01:00
Damir Jelić
ec88e28fd2
Merge branch 'fix-examples'
2021-03-16 16:54:00 +01:00
Julian Sparber
387104e6e0
matrix-sdk: wrap request locks into an Arc
2021-03-16 16:37:50 +01:00
Weihang Lo
de1bf2b89f
matrix-sdk: fix accidentally hidden lines in examples
2021-03-16 23:15:51 +08:00
Weihang Lo
8c1761faed
matrix-sdk: hide get joined room logic
2021-03-16 21:55:15 +08:00
Weihang Lo
cbc8b53da1
client: add test for room_redact
2021-03-16 21:52:15 +08:00
Weihang Lo
b110ee27fa
client: PUT /_matrix/client/r0/rooms/{roomId}/redact/{eventId}/{txnId}
2021-03-16 21:49:47 +08:00
Julian Sparber
5465a7b511
matrix-sdk: prevent frequent typing_notice requests
2021-03-16 10:50:50 +01:00
Julian Sparber
2f769726dd
matrix-sdk: prevent dupplicated members requests
2021-03-15 12:32:57 +01:00
Julian Sparber
31dd031269
matrix-sdk: Move room specific methods to room structs
2021-03-15 10:54:45 +01:00
Julian Sparber
450036cf86
matrix-sdk-test: Add response for members API
2021-03-13 13:15:50 +01:00
Julian Sparber
a4bac499e9
matrix-sdk-base: Add method to get all members from the store
2021-03-13 13:15:50 +01:00
Julian Sparber
2d6502247b
matrix-sdk: Add method to get room as room::Common
2021-03-13 13:15:50 +01:00
Julian Sparber
88e230689e
matrix-sdk: Add high-level room API
2021-03-13 13:15:50 +01:00
Damir Jelić
7c04c3a041
Merge branch 'F1rst-Unicorn/master'
2021-03-13 12:05:30 +01:00
Damir Jelić
75ac29540d
crypto: Simplify counting the number of messages a to-device request has
2021-03-13 11:50:05 +01:00
Weihang Lo
ea7d90de62
client: PUT /_matrix/client/r0/rooms/{roomId}/state/{eventType}/{stateKey}
2021-03-13 16:21:51 +08:00
Damir Jelić
880818a588
crypto: Send bigger sendToDevice requests out that carry our room keys
2021-03-12 16:33:35 +01:00
Damir Jelić
e09a155cfc
crypto: Fix a completely wrong application of extend()
...
We were merging the to-device messages using the extend() method while
our data has the shape of BTreeMap<UserId, BTreeMap<_, _>>, extending
such a map would mean that the inner BTreeMap would get dropped if both
maps contain the same UserId.
We need to extend the inner maps, those are guaranteed to contain unique
device ids.
2021-03-12 16:33:26 +01:00
Jan Veen
42c8c42150
crypto: Improve doc of SAS accept settings
...
Document arguments explicitly.
Adapt to changed implementation.
Provide example call.
2021-03-12 15:45:58 +01:00
Jan Veen
587c09e700
crypto: Prohibit extending verification methods
...
Intersect the allowed methods passed from the user with the methods
supported by the other party. If the user added new methods to the
request, the remote party would cancel the verification.
2021-03-12 14:43:59 +01:00
Jan Veen
e9be23f853
crypto: Add settings to customize SAS accepting
...
Offer specifying settings to SAS accept() requests to limit the allowed
verification methods.
2021-03-11 21:10:26 +01:00
Damir Jelić
7465574bdc
crypto: Fix a clippy warning
2021-03-11 20:06:51 +01:00
Damir Jelić
593b5e55cb
crypto: Don't load the account every time we load sessions in the sled store
...
This removes a massive performance issue since getting sessions is part
of every message send cycle.
Namely every time we check that all our devices inside a certain room
have established 1 to 1 Olm sessions we load the account from the store.
This means we go through an account unpickling phase which contains AES
decryption every time we load sessions.
Cache instead the account info that we're going to attach to sessions
when we initially save or load the account.
2021-03-11 19:49:32 +01:00
Damir Jelić
d4e847f02f
benches: Add a benchmark for the missing session collecting
2021-03-11 13:30:19 +01:00
Damir Jelić
a32f9187e6
benches: Fix the key claiming bench, it needs to run under tokio now
2021-03-11 13:28:22 +01:00
Damir Jelić
daf313e358
crypto: Go through the user device keys in parallel
2021-03-10 14:08:45 +01:00
Damir Jelić
570bd2e358
crypto: Move the tracked users marking out of the device key handling method
2021-03-10 12:20:03 +01:00
Damir Jelić
c8d4cd0a5b
crypto: Calculate the device changes for a given user in parallel
2021-03-10 12:05:21 +01:00
Damir Jelić
0c5d13cb91
crypto: Remove some stale TODO comments
2021-03-10 10:03:54 +01:00
Damir Jelić
aff5cddb68
crypto: Remove an unneeded import.
2021-03-10 09:58:30 +01:00
poljar
4a8c30527d
crypto: Fix a typo.
...
Co-authored-by: Jonas Platte <jplatte@users.noreply.github.com >
2021-03-10 09:54:33 +01:00
Damir Jelić
560aa5b0a9
crypto: Encrypt the share group session requests in parallel.
2021-03-09 15:09:59 +01:00
Damir Jelić
a8bc619dca
crypto: Encrypt room keys for a room key share request in parallel
2021-03-09 14:30:28 +01:00
Damir Jelić
91c326e970
benches: Run the async benches on a tokio runtime.
2021-03-09 14:24:16 +01:00
Damir Jelić
e5585b57e8
Merge branch 'room_merge'
2021-03-08 13:39:46 +01:00
Damir Jelić
61167fab15
crypto: Make restored outbound sessions wait for requests if they have some
2021-03-05 17:12:32 +01:00
Julian Sparber
bc2c924c88
matrix-sdk-base: remove InvitedRoom, JoinedRoom, LeftRoom and RoomState
...
They are all replaced by `Room`
2021-03-05 12:19:50 +01:00
Julian Sparber
9332c55c8d
matrix-sdk-base: merge StrippedRoom and Room
2021-03-05 11:31:01 +01:00
Damir Jelić
c5241af675
crypto: Expose the crypto store error pulicly
2021-03-04 17:46:18 +01:00
Julian Sparber
f6f382e28a
matrix-sdk: Export RoomType
2021-03-03 11:35:02 +01:00
Julian Sparber
31f4a58f38
matrix-sdk-base: Export RoomType
2021-03-03 11:34:59 +01:00
Julian Sparber
780348f546
matrix-sdk-base: Remove the unused enum RoomStateType
2021-03-03 11:18:23 +01:00
Damir Jelić
93e5c34670
crypto: Add a bit more info to the room key sharing logic logging
2021-03-02 17:15:10 +01:00
Damir Jelić
6597948564
crypto: Add a TODO item for m.room_key.withheld messages
2021-03-02 16:27:24 +01:00
Damir Jelić
693a0337a2
crypto: Don't log the devices that receive an outbound session twice
2021-03-02 16:26:58 +01:00
Damir Jelić
7729e2b11f
matrix-sdk: Add some custom debug implementations
...
This should avoid polluting the logs with sled trees and a lot of
redundant info in a device if a device or store ends up in the
structured logs.
2021-03-02 16:22:38 +01:00
Damir Jelić
00df34ed59
Merge branch 'more-benchmarks'
2021-03-02 15:03:24 +01:00
Damir Jelić
8f481dd859
client: Add a method to get all known rooms
2021-03-02 14:58:30 +01:00
Damir Jelić
123772c524
crypto: More logs for the group session sharing logic
2021-03-02 14:54:56 +01:00
Damir Jelić
cb91aa76fc
Merge branch 'group-session-sharing-code-refactoring'
2021-03-02 12:55:37 +01:00
Damir Jelić
bb358909ef
crypto: Fix a typo and improve some logs in the session sharing logic.
2021-03-02 12:54:22 +01:00
Damir Jelić
56a696d1c0
contrib: Make the failures mitmproxy script a bit smarter.
2021-03-02 12:24:23 +01:00
Denis Kasak
3f7eae8633
cargo fmt
2021-03-02 12:20:09 +01:00
Denis Kasak
2b5e1744ee
More refactoring of the group session sharing code for clarity.
2021-03-02 12:20:09 +01:00
Denis Kasak
df8c489304
Fix typo: visiblity -> visibility
2021-03-02 12:20:09 +01:00
Denis Kasak
aa16a7e291
crypto: Refactor the group session rotation code some more for clarity.
2021-03-02 12:20:09 +01:00
Denis Kasak
70ecf269d0
Improve docstring of GroupSessionManager::collect_session_recipients.
2021-03-02 12:20:09 +01:00
Damir Jelić
83926e154b
README: Add a badge that points to the latest master docs
2021-03-02 11:40:02 +01:00
Damir Jelić
42fb88a7f9
Merge branch 'duplicate-content-type-header'
2021-03-02 11:32:40 +01:00
Damir Jelić
4ccb5a1cb9
benches: Benchmark the sled store as well in the key query/claim benches
2021-03-02 11:18:10 +01:00
Damir Jelić
48903a24d2
benches: Benchmark our key sharing throughput
2021-03-02 11:17:38 +01:00
Damir Jelić
e6f6665fa0
Merge branch 'master' into history-visiblity-session-share
2021-03-01 20:47:31 +01:00
Damir Jelić
2e659afd26
crypto: Make it clearer that the deleted flag can only be set to true
2021-03-01 20:34:29 +01:00
Damir Jelić
3a08f0c278
matrix-sdk: Don't set the content type ourselves
...
We don't need to worry about this anymore, since Ruma sets this for all
the request nowadays.
2021-03-01 20:12:38 +01:00
Damir Jelić
9893ddba74
crypto: Use Default to create some test data
2021-03-01 19:41:39 +01:00
Damir Jelić
5c0f0140e9
matrix-sdk: Fix some doc examples
2021-03-01 19:41:14 +01:00
Damir Jelić
1f5cad136e
matrix-sdk: Bump Ruma
2021-03-01 19:20:07 +01:00
Damir Jelić
4c3cd29224
matrix-sdk: Don't set two content-type headers for json contents
...
Ruma will for some requests already set the content-type for us to
application/json, but for some it still seems to miss the header, since
the headers are kept in a map add the header only if it isn't already
there.
2021-03-01 16:37:56 +01:00
Damir Jelić
ffaddb22b8
Merge branch 'docs-github-pages'
2021-03-01 13:15:43 +01:00
Julian Sparber
8ebd61dd18
CI: Publish docs via github pages
...
Fixes: https://github.com/matrix-org/matrix-rust-sdk/issues/154
2021-03-01 12:53:35 +01:00
Damir Jelić
c8e769860b
Merge branch 'benchmarks'
2021-03-01 12:30:10 +01:00
Damir Jelić
e1d4fe533d
crypto: Make pprof a Linux specific dependency
2021-03-01 11:46:28 +01:00
Damir Jelić
447d78567a
contrib: Add a mitmproxy script to block well-known lookups
...
This is useful if a test server sends incorrect homeserver URLs in their
well-known data, for example the Synapse instance Complement starts up
does so.
2021-03-01 11:15:50 +01:00
Damir Jelić
d07ac997f2
README: Add a badge for our docs
2021-03-01 11:15:34 +01:00
Damir Jelić
fc6ff4288e
benches: Add support to generate flamegraphs when we profile our benchmarks
2021-02-28 11:28:10 +01:00
Damir Jelić
c64567ba9b
crypto: Add a bench for the key claiming process
2021-02-27 18:40:58 +01:00
Damir Jelić
6e168051b6
crypto: Chunk out key query requests.
2021-02-26 16:48:42 +01:00
Damir Jelić
2a09e588f3
crypto: Log when we receive room keys
2021-02-17 16:01:51 +01:00
Damir Jelić
5ca40b9893
crypto: Be more forgiving when updating one-time key counts
2021-02-17 15:24:46 +01:00
Damir Jelić
6cc03d1c19
crypto: Improve the logging for deserialization failures
2021-02-17 15:23:26 +01:00
Damir Jelić
544881f11c
crypto: Fix a clippy warning
2021-02-16 10:52:19 +01:00
Damir Jelić
ef5d7ca579
crypto: Add missing flush calls to the sled crypto store
2021-02-16 10:29:10 +01:00
Damir Jelić
1db89741bc
matrix-sdk: Re-export the EncryptionInfo struct
2021-02-16 09:42:23 +01:00
Damir Jelić
c39fa6543f
crypto: Expose the EncryptionInfo struct publicly
2021-02-15 15:19:48 +01:00
Damir Jelić
fe11ad7e3e
matrix-sdk: Remove the design doc for now
...
It's outdated and somewhat misleading, so remove it for now until we
have a new one with pictures and stuff.
Closes : #139
2021-02-15 09:44:48 +01:00
Cédric Barreteau
b6f2c43330
Rename EventEmitter to EventHandler
2021-02-13 11:01:31 +01:00
Cédric Barreteau
e3e48148f0
Rename add_event_emitter to set_event_emitter
...
Closes #145 .
2021-02-13 10:43:42 +01:00
Damir Jelić
2811c490a0
matrix-sdk: Fix some new clippy warnings
2021-02-12 12:59:53 +01:00
Jonas Platte
2e7f862f9c
Delete .travis.yml
...
CI has been moved to GitHub actions a while ago.
2021-02-12 12:29:50 +01:00
Damir Jelić
e857172170
base: Fix a couple of typos
2021-02-10 21:32:33 +01:00
Damir Jelić
b7fda1deb7
base: Fix a typo in the room members
2021-02-10 20:57:26 +01:00
Damir Jelić
c34f69f8a3
crypto: Don't receive the whole sync response, only what we need.
...
This makes it clearer what the crypto layer is doing, this also makes it
clearer for people that will use the crypto layer over FFI that they
don't need to go through a serialize/deserialize cycle for the whole
sync response.
2021-02-10 15:42:55 +01:00
Damir Jelić
e3d1de8e6c
client: Fix the sync_with_callback example
2021-02-10 09:51:14 +01:00
Damir Jelić
19b78be93f
base: Fix a typo
2021-02-10 09:15:25 +01:00
Damir Jelić
e437aea012
Merge branch 'bump_ruma'
2021-02-09 10:56:40 +01:00
Julian Sparber
155f975262
Update ruma to rev d6aa37c848b7f682a98c25b346899e284ffc6df7
...
This enables the `compat` feature of ruma to increase compatipility.
2021-02-09 10:46:33 +01:00
Damir Jelić
e7e43a8bf0
matrix-sdk: Use a released version of backoff
2021-02-07 17:21:50 +01:00
Damir Jelić
0289f564b4
Merge branch 'pub-exports'
2021-02-07 13:58:33 +01:00
Damir Jelić
1e67f338ac
Merge branch 'request-retrying'
2021-02-07 13:52:25 +01:00
Damir Jelić
36e3039d73
matrix-sdk: Disable request retrying for wasm for now
...
Backoff supports the retry method for futures only for non-wasm
targets for now, thus we're going to disable it until that changes.
2021-02-07 12:53:06 +01:00
Devin Ragotzy
fcd1c87765
matrix_sdk: export CustomEvent and StateChanges add docs to StateChanges
2021-02-04 15:54:20 -05:00
Damir Jelić
1799721a5f
crypto: Store the history visibility with inbound group sessions
...
This can be useful to share the room history with new room members.
2021-02-03 16:59:34 +01:00
Damir Jelić
9e83eaf2f5
crypto: Store the history visiblity with the outbound session
2021-02-03 16:01:58 +01:00
Damir Jelić
347f79d08c
base: Respect the history visiblity setting when sharing group sessions
2021-02-03 13:56:31 +01:00
Julian Sparber
bdaed6237e
base: make fields of UnreadNotificationsCount public
2021-02-02 21:11:51 +01:00
Damir Jelić
ca7117af2b
matrix-sdk: Clamp the request timeout for uploads to a sensible value
2021-02-01 21:56:15 +01:00
Damir Jelić
f3d4f6aab4
matrix-sdk: Fix our HttpClient trait implementation example
2021-02-01 19:24:29 +01:00
Damir Jelić
19e9884963
matrix-sdk: Update for the latest backoff changes
2021-02-01 17:58:03 +01:00
Damir Jelić
2e2d9b33a4
contrib: Add a mitmproxy script which can be used to test out request retrying
2021-02-01 17:30:43 +01:00
Damir Jelić
a551ae2bee
matrix-sdk: Add sensible connection and request timeouts
...
This sets the default
* connection timeout to 5s
* request timeout to 10s
* request timeout for syncs to the sync timeout + 10s
* request timeout for uploads to be based on 1Mbps upload
speed expectations
2021-02-01 17:15:29 +01:00
Damir Jelić
6a4ac8f361
matrix-sdk: Replace some unwraps with expects.
2021-01-31 21:12:00 +01:00
Damir Jelić
42ec456abf
matrix-sdk: Add initial support for request retrying
2021-01-31 21:10:30 +01:00
Damir Jelić
585ca9fdf7
matrix-sdk: Split out the http errors into a sub-enum
2021-01-31 18:09:03 +01:00
Damir Jelić
b66c666997
base: Expose and document the stripped room info
2021-01-28 14:59:57 +01:00
Damir Jelić
92f0523e37
base: More docs
2021-01-28 14:51:34 +01:00
Damir Jelić
58691986a9
base: Initial set of docs
2021-01-28 14:10:26 +01:00
Damir Jelić
10da61c567
crypto: Answer key reshare requests only at the originally shared message index
2021-01-28 14:07:51 +01:00
Damir Jelić
bf4f32eccf
crypto: Remove the sqlite store for now
2021-01-27 15:29:42 +01:00
Damir Jelić
bc3ba3fab0
crypto: Add tests for the sled cryptostore
2021-01-27 15:19:32 +01:00
Damir Jelić
d6c5a4d8aa
crypto: Add a missing encode call in the sled store
2021-01-27 15:15:45 +01:00
Damir Jelić
81667173b6
matrix-sdk: Re-enable some more client tests
2021-01-27 14:43:53 +01:00
Damir Jelić
cb26e653da
base: Add a TODO explaining how redacted state needs to be healed
2021-01-27 12:39:54 +01:00
Damir Jelić
442103a37e
base: Store the display names in the memory store as well
2021-01-27 11:59:30 +01:00
Damir Jelić
094ead9d7d
base: Allow users to inspect the ambiguity change a member event triggers
2021-01-27 11:46:44 +01:00
Damir Jelić
55430dd3d2
base: Us and_then() instead of map() + flatten()
2021-01-26 19:28:17 +01:00
Damir Jelić
b3cfa48b45
base: Allow inspecting dispaly name owners in the sate inspector
2021-01-26 14:44:37 +01:00
Damir Jelić
71a087c379
crypto: Encode our keys in the sled cryptostore as well
2021-01-26 14:22:03 +01:00
Damir Jelić
fc085a7391
base: Use encoded keys for the whole sled store
2021-01-26 14:04:37 +01:00
Damir Jelić
b4a916b797
base: Add a method to get all the user ids that use a certain display name
2021-01-26 13:22:06 +01:00
Damir Jelić
6cb2c8b468
crypto: Store and restore outbound group sessions
2021-01-25 17:14:13 +01:00
Damir Jelić
ac6dad3f35
matrix-sdk: Bump our deps
2021-01-25 15:47:51 +01:00
Damir Jelić
c1f9d3bc39
crypto: Add a bench for our key query response handling
2021-01-25 10:13:08 +01:00
Damir Jelić
eb8138ca6a
base: Restore stripped room infos as well
2021-01-23 17:29:43 +01:00
Damir Jelić
44974982e1
client: Add an accessor method for the device id
2021-01-23 15:59:53 +01:00
Damir Jelić
077050efb4
crypto: Add a hack so e2ee support works under WASM again
2021-01-22 18:40:08 +01:00
Damir Jelić
d10b85a05d
matrix-sdk: Fix our wasm command bot example
2021-01-22 18:14:08 +01:00
Damir Jelić
9c98d0227b
matrix-sdk: Make the http client trait WASM compatible
2021-01-22 18:12:46 +01:00
Damir Jelić
8028c23f56
base: Feature flag the sled state store
2021-01-22 18:10:17 +01:00
Damir Jelić
cb12bc1584
base: Use Instant instead of SystemTime for wasm compatibility
2021-01-22 18:07:34 +01:00
Damir Jelić
b83399ba14
base: Fix a typo take two
2021-01-22 16:07:24 +01:00
Damir Jelić
5daa22250f
base: Fix a typo
2021-01-22 15:45:14 +01:00
Damir Jelić
c034de470b
base: Allow using the same sled database for the state and cryptostore
2021-01-22 11:33:06 +01:00
Damir Jelić
9cd217fc5d
matrix-sdk: Remove the proxy usage from the exmaples for now
...
While it's generally useful to watch what the sdk is sending
out during development using mitmproxy, users of the sdk might
wonder why the example doesn't connect.
Remove the proxy usage until we add a cli parser which can enable proxy
support with a command line switch.
2021-01-22 11:32:33 +01:00
Damir Jelić
cf07fc8e8e
Merge branch 'master' into new-state-store
2021-01-21 19:58:40 +01:00
Tilo Spannagel
7b8d2b5319
Add support for ruma feature flag markdown
...
Signed-off-by: Tilo Spannagel <development@tilosp.de >
2021-01-21 18:22:17 +01:00
Tilo Spannagel
abd62cab0d
Update ruma to rev 8c109d3c0a7ec66b352dc82677d30db7cb0723eb
...
Signed-off-by: Tilo Spannagel <development@tilosp.de >
2021-01-21 18:22:08 +01:00
Damir Jelić
7d45417a17
base: Add a memory-only store
2021-01-21 16:31:33 +01:00
Damir Jelić
66ecb4c1e6
base: Store room infos for left and invited rooms
2021-01-21 15:12:13 +01:00
Damir Jelić
1483c22171
crypto: Don't send out empty to-device reuqests when sharing sessions
...
An empty to-device request can happen if we're trying to re-share a
session with devices that are we're missing an olm session with so don't
send them out.
2021-01-21 14:04:31 +01:00
Damir Jelić
ae0d810fb0
base: Avoid the Trait is not general enough issue again
2021-01-21 14:03:41 +01:00
Damir Jelić
948c811d4b
client: Simplify the auto key-claiming invocation
2021-01-21 14:03:20 +01:00
Damir Jelić
ef2f20eb97
crypto: Rotate the megolm session if a device gets blacklisted
2021-01-21 12:19:02 +01:00
Damir Jelić
303ac513e5
base: Remove some stale files from the old state store
2021-01-21 12:13:46 +01:00
Damir Jelić
de4df4e50a
base: Re-introduce a state store trait.
2021-01-21 12:08:16 +01:00
Damir Jelić
2bcc0afb91
base: Use a CSPRNG to get our randomness and handle randomness errors
...
Since we're going to encrypt a lot of small objects separately we're
gonna need a lot of random nonces, it doesn't help that our nonces are
24 bytes long either. So use a CSPRNG to random data faster, also don't
panic if there wasn't enough randomness.
2021-01-20 16:59:46 +01:00
Damir Jelić
0a6b0e5804
base: Properly handle crypto related errors in the sled store
2021-01-20 16:27:59 +01:00
Damir Jelić
4a06c9e82d
base: Initial support for an encrypted sled store.
2021-01-20 15:57:23 +01:00
Damir Jelić
06a973a1b8
crypto: Don't use the full PBKDF rounds when testing
2021-01-20 14:10:57 +01:00
Damir Jelić
28cc5acc87
base: Add a store key struct
2021-01-20 14:10:57 +01:00
Damir Jelić
2b5ff82414
base: Move the sled store into a subfolder
2021-01-20 10:25:54 +01:00
Damir Jelić
3472c99c27
base: Split out the store module into smaller submodules
2021-01-19 16:48:37 +01:00
Damir Jelić
17f3dbb0a0
crypto: Return a deserialized ToDevice struct when we receive a sync
2021-01-19 12:59:31 +01:00
Damir Jelić
6a30514d40
base: Move the deserialized responses types into the common crate
2021-01-19 12:30:58 +01:00
Damir Jelić
4f4ba831c1
crypto: Bump the PBKDF rounds for the pickle key derivation
2021-01-19 12:05:30 +01:00
Damir Jelić
b8fcc003ea
base: Finish up the error handling for the new stores
2021-01-19 12:03:46 +01:00
Damir Jelić
ef95d9b539
crypto: Fix a misleading comment about the outbound session rotation period
2021-01-19 10:21:12 +01:00
Damir Jelić
377b8ea75a
crypto: Use consistent ordering for the group session sharing log line
2021-01-19 10:19:15 +01:00
Damir Jelić
4af9b74776
crypto: Properly clamp the rotation period of the outbound session
2021-01-18 20:46:34 +01:00
Damir Jelić
d07063af2b
base: Add some error handling to the state store
2021-01-18 18:07:53 +01:00
Damir Jelić
e5ba0298d0
crypto: Refactor and document the share group session method a bit better
2021-01-18 15:21:54 +01:00
Damir Jelić
4eb504d000
crypto: Improve the log line when we share group sessions
2021-01-18 14:15:31 +01:00
Damir Jelić
436530e874
crypto: Fix a couple clippy warnings
2021-01-18 13:50:59 +01:00
Damir Jelić
1746690eda
crypto: Add a sled cryptostore
2021-01-18 13:38:00 +01:00
Damir Jelić
629a8ee84f
crypto: Add getters for the sender key in our sessions
2021-01-18 13:28:09 +01:00
Damir Jelić
5418c88775
crypto: Add some more serialize/deserialize implementations
2021-01-18 13:21:30 +01:00
Damir Jelić
14575892bd
crypto: Implement serialize/deserialize for devices.
2021-01-18 13:19:13 +01:00
Damir Jelić
43a74524c5
crypto: Add a pending requests method for the outbound group session
2021-01-18 12:44:19 +01:00
Amanda Graven
aadbc14dc6
Add accessor for room member avatar urls
2021-01-15 18:59:51 +01:00
Damir Jelić
bab8fde0ac
crypto: Change the way we share group sessions
...
This patch removes the need to ask if a group session needs to be shared
it also adapts the method so it re-shares sessions if new users or
devices join the group.
2021-01-15 18:04:45 +01:00
Damir Jelić
40c53f09ba
base: Handle room avatar updates
2021-01-15 09:57:59 +01:00
Damir Jelić
508bf3b23d
base: Include the to-device events when returning the sync response
2021-01-14 13:35:21 +01:00
Damir Jelić
43ea9a16a0
crypto: Use the chain method to get the sha hash of the content
2021-01-14 13:34:12 +01:00
Damir Jelić
3f3ae794a4
crypto: Don't log an error for the commitment calculation since it isn't one
2021-01-14 13:32:39 +01:00
Amanda Graven
9efece4f7a
Remove unnecessary clones
2021-01-11 14:17:17 +01:00
Damir Jelić
077c20ed74
base: Really fix the holding on across await points issue for room names
2021-01-11 13:40:35 +01:00
Amanda Graven
6c4888a123
Don't hold lock during await in name calculation
2021-01-11 13:18:26 +01:00
Damir Jelić
643526987f
Merge branch 'master' into new-state-store
2021-01-05 21:40:39 +01:00
Damir Jelić
b311a31c9e
matrix-sdk: Bump our tokio and reqwest versions.
2021-01-05 21:39:52 +01:00
Damir Jelić
b8c6c2e07c
rooms: Use unstable member sorting for the room name calculation
2021-01-05 20:26:27 +01:00
Damir Jelić
cdc93ddd0f
base: Refactor and fix the room name calculation for non-stripped rooms
2021-01-05 20:09:06 +01:00
Damir Jelić
ccd8a4d602
Merge branch 'master' into new-state-store
2021-01-05 17:03:24 +01:00
Damir Jelić
f3acf582ec
base: Fix a typo.
2021-01-04 18:34:23 +01:00
Damir Jelić
22b13c369b
base: Add a method to check if the room is public.
2021-01-04 18:26:53 +01:00
Damir Jelić
76ce3fecb3
client: Re-enable two additional tests
2021-01-04 18:02:36 +01:00
Damir Jelić
99c1f70c1a
Merge branch 'release-0.2' into new-state-store
2021-01-04 17:44:20 +01:00
Damir Jelić
c6a80dc921
Merge branch 'master' into new-state-store
2021-01-04 17:34:33 +01:00
Damir Jelić
e9d22c95a4
base: Handle the join rules, history visibility and guest access
2021-01-04 15:12:02 +01:00
Damir Jelić
108d4ebffe
Merge branch 'master' into new-state-store
2021-01-04 14:16:15 +01:00
Damir Jelić
e66add476f
base: Store the room creation content
...
The power level depends on a bunch of stuff, if no power level event
exists the default for a room creator is 100 while for every other user
is 0, thus we need to know the room creator.
2021-01-04 12:32:54 +01:00
Damir Jelić
4afc6b2567
base: Don't mark all the room methods as public.
2021-01-04 12:26:13 +01:00
Damir Jelić
83b850d8f9
base: Add the last missing accessors and reorder them.
2021-01-04 10:15:02 +01:00
Damir Jelić
e7e1d2d3eb
base: Add more accessors for the room info.
2021-01-04 10:03:16 +01:00
Damir Jelić
74998c8dd8
rooms: Add a method to get the room topic.
2021-01-03 16:52:47 +01:00
Damir Jelić
0edef38eb7
base: Fix some clippy warnings
2021-01-02 13:54:47 +01:00
Damir Jelić
807c58649d
Merge branch 'crypto-improvements' into new-state-store
2021-01-02 13:49:20 +01:00
Damir Jelić
bafe9a0f61
crypto: Fix a couple of clippy warnings.
2021-01-02 13:47:53 +01:00
Damir Jelić
f1140fec8b
Merge branch 'crypto-improvements' into new-state-store
2021-01-02 13:17:25 +01:00
Damir Jelić
f9f176ccfd
base: Rename the state store example.
2021-01-02 13:04:05 +01:00
Damir Jelić
16f94ecc1d
base: Improve the state store example so it can run non-interactively
2021-01-02 12:58:52 +01:00
Damir Jelić
b995492457
base: Add a method to get either the display name or the localpart of an user
2021-01-01 14:59:30 +01:00
Damir Jelić
0c81f3d9ae
base: Add a method to get all joined members.
2021-01-01 14:58:44 +01:00
Damir Jelić
c804104293
client: Add the get_x_room methods back.
2021-01-01 14:57:39 +01:00
Damir Jelić
0952205e1e
base: Restore rooms and the sync token when we restore the login.
2021-01-01 14:56:06 +01:00
Damir Jelić
4d7da05b90
base: Store the sync token.
2021-01-01 14:54:52 +01:00
Damir Jelić
d121a856c4
base: Remember the direct target for rooms.
2021-01-01 14:31:50 +01:00
Damir Jelić
2384069641
base: Add the normalized_power_level method back to the member.
2020-12-24 17:14:46 +01:00
Damir Jelić
a29d2e39c4
base: Save profiles independently from membership events.
...
The sender controls the content of the membership event, since the
content contains profile data (display names, avatar urls) a sender
might incorrectly change the profile of another member inside the room.
This is allowed in the case where the sender is kicking or inviting the
member, this it will self heal once the member re-joins. Still, to
mitigate this a bit we're storing the profile data when we know that the
member sent out the content on their own.
2020-12-24 16:35:32 +01:00
Damir Jelić
0d99d8cc23
crypto: Test verification request starting up to SAS.
2020-12-24 15:22:51 +01:00
Damir Jelić
e2225b2700
base: Add a state store inspector to the examples.
2020-12-23 14:53:14 +01:00
Damir Jelić
8857335a7d
Merge branch 'crypto-improvements' into new-state-store
2020-12-22 16:18:46 +01:00
Damir Jelić
007e452d39
Merge branch 'master' into crypto-improvements
2020-12-22 15:53:08 +01:00
Damir Jelić
1313c3da3c
client: Restore the membership based get room methods.
2020-12-22 10:47:21 +01:00
Damir Jelić
1bfb2d08a6
base: Remove the obsolete models files.
2020-12-22 10:14:16 +01:00
Damir Jelić
c5709d23a5
base: Implement the last missing thing to get the emitter working again.
2020-12-22 10:09:59 +01:00
Damir Jelić
e25441babc
base: Create a store wrapp and move store methods under it.
2020-12-20 16:27:29 +01:00
Damir Jelić
a370eb1e37
base: Re-introduce the event emitter.
2020-12-19 20:20:39 +01:00
Damir Jelić
f9af880176
base: Upcast the bare rooms based on the membership state
2020-12-19 16:37:35 +01:00
Damir Jelić
7abf0c8805
store: Honor state keys for the state storage.
2020-12-19 14:44:46 +01:00
Damir Jelić
b119b30939
crypto: Clippy warnings.
2020-12-18 19:26:51 +01:00
Damir Jelić
55436c6514
crypto: Add a test for verification request flows.
2020-12-18 18:23:42 +01:00
Damir Jelić
ec863a928d
crypto: More clippy warnings.
2020-12-18 13:57:57 +01:00
Damir Jelić
1fd8c2052e
crypto: Fix a bunch of clippy warnings.
2020-12-18 13:50:02 +01:00
Damir Jelić
897c6abe92
crypto: Fix our tests now that we support in-room verifications.
2020-12-18 12:55:06 +01:00
Damir Jelić
f735107caf
crypto: Remove an unused argument.
2020-12-17 17:03:42 +01:00
Damir Jelić
48f43a4af1
crypto: Remove some unused imports.
2020-12-17 16:28:12 +01:00
Damir Jelić
4ad4ad1e94
crypto: Send out done events for in-room verifications.
2020-12-17 15:50:13 +01:00
Damir Jelić
79102b3390
crypto: Make the cancelations output only CancelContents.
2020-12-17 12:15:11 +01:00
Damir Jelić
b6e28e2280
crypto: WIP more work on in-room verifications now up to accepting them.
2020-12-15 16:35:54 +01:00
Damir Jelić
b05fed5a3b
matrix-sdk: Fix our tests now that the state store is roughly done.
2020-12-15 10:23:31 +01:00
Damir Jelić
b4edaffbe1
base: Rename the method to get joined/invited members.
2020-12-14 15:54:49 +01:00
Damir Jelić
45db95742a
base: Add a common room info struct for normal and stripped rooms.
2020-12-14 14:53:50 +01:00
Damir Jelić
3a76cf7692
base: Restore getting the user ids when receiving a sync.
2020-12-14 13:48:29 +01:00
Damir Jelić
05b1384d16
base: Upcast member events so the state key is an user id.
2020-12-12 21:44:53 +01:00
Damir Jelić
e245599913
base: Save the stripped state of invited rooms.
2020-12-11 21:17:27 +01:00
Damir Jelić
b16e3b6bd8
base: Rename joined rooms as they are used for left rooms as well.
2020-12-11 16:42:38 +01:00
Damir Jelić
5105629c08
crypto: WIP handle in-room start events.
2020-12-11 16:13:58 +01:00
Damir Jelić
7570cf5ac2
crypto: WIP genrealize the sas so it can handle in-room and to-device events.
2020-12-11 15:42:49 +01:00
Damir Jelić
6f35a05311
matrix-sdk: Allow users to get a reference to the store.
2020-12-11 09:52:39 +01:00
Damir Jelić
b0ac9d3320
crypto: WIP change the types of the sas sturcts to allow in-room verifications.
2020-12-10 17:49:28 +01:00
Damir Jelić
1bb5b42b1d
crypto: Prepare the sas structs to handle in-room verifications.
2020-12-10 15:18:28 +01:00
Damir Jelić
b9ddbb11af
crypto: Move the inner sas struct into a separate module.
2020-12-10 14:07:47 +01:00
Damir Jelić
a4e7dc1042
base: Correctly store the state events of rooms.
2020-12-10 10:01:53 +01:00
Damir Jelić
ae33904a93
base: Rename some structs.
2020-12-09 20:22:11 +01:00
Damir Jelić
a08f857e49
base: Split out the new room and member structs from the state store
2020-12-09 18:12:51 +01:00
Damir Jelić
7198b0daba
crypto: WIP key verification request handling.
2020-12-09 17:18:23 +01:00
Damir Jelić
5babd71341
crypto: Copy the relates to field to the unencrypted content when encrypting
2020-12-09 17:16:03 +01:00
Damir Jelić
d4ebe8cc83
Merge branch 'crypto-improvements' into new-state-store
2020-12-08 16:54:23 +01:00
Damir Jelić
6d2d48a35a
base: WIP inivted rooms handling.
2020-12-08 09:52:27 +01:00
Damir Jelić
5c608ed474
base: Store main account data.
2020-12-07 16:35:00 +01:00
Damir Jelić
e38f0762ee
base: Store the notification counts.
2020-12-07 15:11:18 +01:00
Damir Jelić
ab832da03e
base: Deserialize ephemeral events.
2020-12-07 14:34:18 +01:00
Damir Jelić
de61798d78
base: Store room account data.
2020-12-07 14:17:18 +01:00
Damir Jelić
b36d907fac
base: Add the power level event to the room member.
2020-12-06 18:11:32 +01:00
Damir Jelić
886a1c7a77
Merge branch 'crypto-improvements' into new-state-store
2020-12-05 15:01:21 +01:00
Damir Jelić
2bcdd0163b
Merge branch 'crypto-improvements' into new-state-store
2020-12-04 17:02:32 +01:00
Damir Jelić
f483a56f81
crypto: Remove a bunch of unneeded whitespace in a log line.
2020-12-04 17:01:15 +01:00
Damir Jelić
a5131a0a73
crypto: Log both user id versions when the device keys mismatch.
2020-12-04 16:58:20 +01:00
Damir Jelić
a7b31c90e0
Merge branch 'crypto-improvements' into new-state-store
2020-12-04 15:13:48 +01:00
Damir Jelić
8a842ec0a5
base: Log deserialization errors for decrypted events.
2020-12-04 15:13:37 +01:00
Damir Jelić
1b6bdc3307
crypto: Preserve the relationship info while decrypting events.
2020-12-04 15:12:46 +01:00
Damir Jelić
1733808221
Merge branch 'crypto-improvements' into new-state-store
2020-12-04 13:50:39 +01:00
Damir Jelić
8291b93356
matrix-sdk: Update ruma.
2020-12-04 13:35:56 +01:00
Damir Jelić
45442dfac8
Merge branch 'master' into new-state-store
2020-12-01 17:24:00 +01:00
Damir Jelić
27b5bf3ddd
base: Add initial left rooms handling.
2020-12-01 10:23:28 +01:00
Damir Jelić
0e563a9a81
base: Refactor out the room state/timeline handling.
2020-11-30 17:25:29 +01:00
Damir Jelić
7dd834a214
base: Add some more sync response fields.
2020-11-30 15:50:47 +01:00
Damir Jelić
b4d0179c18
base: Fetch the member presence when we fetch members.
2020-11-30 14:55:18 +01:00
Damir Jelić
38048a2043
base: Add presence storing.
2020-11-30 14:42:08 +01:00
Damir Jelić
ac2d90e92a
client: Apply room changes when fetching members.
2020-11-30 09:19:11 +01:00
Damir Jelić
a8d6909c56
crypto: Use a released sqlx version.
2020-11-29 11:22:53 +01:00
Damir Jelić
fcb50956bb
Merge branch 'master' into new-state-store
2020-11-26 15:18:38 +01:00
Damir Jelić
43ced3d279
Merge branch 'crypto-improvements' into new-state-store
2020-11-26 14:08:17 +01:00
Damir Jelić
baa5bed1c9
Merge branch 'crypto-improvements' into new-state-store
2020-11-26 14:00:18 +01:00
Damir Jelić
de5f5cf00a
base: A better log message for unhandled member events.
2020-11-24 10:58:33 +01:00
Damir Jelić
35069c5252
base: Turn the get member method async.
2020-11-24 10:58:14 +01:00
Damir Jelić
dadcc68336
base: Use the room summary for the display name calculation if we have one.
2020-11-24 10:57:21 +01:00
Damir Jelić
64fff933af
base: Store the room topic with the room summary.
2020-11-24 10:56:43 +01:00
Damir Jelić
c13d04ae18
matrix-sdk: Return the members response in our get members method.
2020-11-24 10:56:07 +01:00
Damir Jelić
e84d3b9950
base: Track new users we get from the room/members call.
2020-11-23 17:19:55 +01:00
Damir Jelić
c1383402ed
matrix-sdk: Initial support to upload filters.
2020-11-22 21:25:31 +01:00
Damir Jelić
a98f23e2a7
base: Add a deserialized SyncResponse type.
2020-11-21 22:48:27 +01:00
Damir Jelić
53daf40c7c
matrix-sdk: Use the latest ruma and olm-rs.
2020-11-21 16:33:12 +01:00
Damir Jelić
9edf8657d0
base: WIP lazy loading support.
2020-11-20 20:17:59 +01:00
Damir Jelić
3da1d3cf8f
store: Use streams so we don't load all members at once.
2020-11-16 18:11:12 +01:00
Damir Jelić
8ed8929788
base: Fix the storing of invited and joined user ids.
2020-11-12 12:59:43 +01:00
Damir Jelić
133b230964
base: Change the way we're saving our room summary updates.
2020-11-12 11:21:37 +01:00
Damir Jelić
3a1eeb6a16
Merge branch 'crypto-improvements' into new-state-store
2020-11-11 14:43:49 +01:00
Damir Jelić
3f57ba57d0
base: WIP start to split out the steps collect changes, save changes,
...
apply changes.
2020-11-11 14:37:04 +01:00
Damir Jelić
dc57873687
base: WIP more work on the new state store.
2020-10-25 21:03:03 +01:00
Damir Jelić
962f725d63
Merge branch 'crypto-improvements' into new-state-store
2020-10-24 20:16:59 +02:00
Damir Jelić
c1e679147d
base: First working version of the new state store.
2020-10-24 20:01:39 +02:00
Damir Jelić
4cc803fe27
crypto: WIP cross signing bootstrap.
2020-10-24 10:32:17 +02:00
Damir Jelić
9ce7feea1a
base: Wip.
2020-10-23 09:39:08 +02:00
Damir Jelić
bdf32eecc7
base: More work on the new state store.
2020-10-22 09:46:12 +02:00
Damir Jelić
5323e6e270
store: More work, add the ability to store member events.
2020-10-21 09:38:13 +02:00
Damir Jelić
045ab25fb7
base: Add initial state store based on sled.
2020-10-20 17:36:21 +02:00
Damir Jelić
cd3d90df3f
base: Remove a bunch of stuff and add sled.
2020-10-20 17:36:21 +02:00
Jonas Platte
92bedb4571
Upgrade ruma
2020-10-20 17:36:21 +02:00