Commit graph

380 commits

Author SHA1 Message Date
Damir Jelić
e9d6e28e13 matrix-sdk: Remove some unused deps. 2020-05-06 17:06:24 +02:00
Damir Jelić
d8b9dc8519 base: Don't expose the client fields publicly. 2020-05-06 15:55:18 +02:00
Damir Jelić
1639f0fdd8 async_client: Remove the lock around the base client. 2020-05-06 15:36:55 +02:00
Damir Jelić
02013ac286 base: Move the state store behind a lock. 2020-05-06 15:20:20 +02:00
Damir Jelić
6e9e817597 crypto: Use next() instead of nth(0). 2020-05-06 15:00:16 +02:00
Damir Jelić
3d03f77dba base: Lock the event emitter option. 2020-05-06 14:47:58 +02:00
Damir Jelić
3a30d53437 base_client: Move the session behind a lock. 2020-05-06 14:27:53 +02:00
Damir Jelić
967544bab9 base_client: Make the base client a bit more threadsafe.
This moves the bulk of the sync logic into the base client, to avoid
deadlocks while someone tires to send messages from a event callback the
base client needed to get a bunch of locks.

Ideally the AsyncClient would not need a lock for the base client at all
but we're not there yet.
2020-05-06 13:57:58 +02:00
Damir Jelić
39e59792d2 crypto: Remove the session key in room key events again. 2020-05-06 12:15:15 +02:00
Damir Jelić
e0477fa053 types: Use the released version of ruma-client-api. 2020-05-06 09:38:31 +02:00
Damir Jelić
7b6e030823 matrix-sdk: Fix the last Ruma incompatibilities. 2020-05-05 15:29:25 +02:00
Damir Jelić
a54fec7ac5 base: Fix another instance of missing PartialEq support. 2020-05-04 14:22:10 +02:00
Damir Jelić
940332d414 crypto: Disable the failing tests now that the crypto is non-functional. 2020-05-04 14:21:48 +02:00
Damir Jelić
fed3c80466 crypto: Fix the tests now that events don't implement PartialEq. 2020-05-04 14:15:55 +02:00
Damir Jelić
86dc1ce3ca crypto: Disable the creation of encrypted event content for now.
It isn't possible to encrypted events using ruma anymore. This will need
to be re-enabled once ruma gets back support for this.
2020-05-04 14:12:42 +02:00
Damir Jelić
704d8bc0ed crypto: The algorithm specific contents don't take an algorithm anymore. 2020-05-04 14:11:06 +02:00
Damir Jelić
60cc939fdd matrix-sdk: Update our deps and re-implement PartialEq for the ClientState. 2020-05-04 14:06:34 +02:00
Damir Jelić
addb455d16 crypto: Add all the missing docs and deny missing docs from now on. 2020-04-30 17:10:12 +02:00
Damir Jelić
5dc0842f49 crypto: Implmement device deletion for the sqlite store. 2020-04-30 14:33:41 +02:00
Damir Jelić
e109e01a28 crypto: More lint fixes. 2020-04-30 14:29:58 +02:00
Damir Jelić
3bcce962e3 matirx_sdk: Fix a bunch of clippy warnings. 2020-04-30 14:07:49 +02:00
Damir Jelić
fc0d4a7d35 crypto: Rework our errors making them more specific. 2020-04-30 13:16:10 +02:00
Damir Jelić
5de32c025f crypto: Allow session to be saved in a batched way. 2020-04-30 12:08:38 +02:00
Damir Jelić
e33fd098bc crypto: Make the save device method of the store accept a slice of devices. 2020-04-30 11:51:20 +02:00
Damir Jelić
157dc86b61 matrix_sdk: Style fix for a docstring. 2020-04-30 10:14:18 +02:00
Devin R
376381b1a7 state_store: remove device_id and user_id from ClientState 2020-04-29 15:42:20 -04:00
Devin R
955f6248cf async_client: fix clippy warning 2020-04-29 08:10:53 -04:00
Devin R
ef560fd545 state_store: load_client takes a sessions obj, docs, copyright, move state store into base client 2020-04-29 07:00:14 -04:00
Damir Jelić
83f3fc6796 travis: Update our Travis setup for the new workspace setup. 2020-04-29 10:56:17 +02:00
Damir Jelić
4c760fca02 matrix_sdk: Use the internal types crate. 2020-04-29 10:40:27 +02:00
Damir Jelić
c5d833a14b Merge branch 'state-store' 2020-04-29 10:06:02 +02:00
Damir Jelić
5fef444d61 matrix-sdk: Split out the crypto part of the sdk into a separate crate. 2020-04-29 09:48:00 +02:00
Damir Jelić
cf9ecbd0e8 crypto: Use an atomic int for the key count. 2020-04-28 15:47:49 +02:00
Damir Jelić
350578739c crypto: Make the user_id/device_id/identity_keys public methods. 2020-04-28 15:06:32 +02:00
Damir Jelić
d220c6cb29 crypto: Test the megolm encyrption. 2020-04-28 14:48:49 +02:00
Damir Jelić
404f3a128d crypto: Test group session sharing. 2020-04-28 10:47:08 +02:00
Devin R
631ad261ae state_store: append user name to path when store_room_state is called 2020-04-27 16:55:40 -04:00
Devin R
c91263eb13 Merge branch 'master' into state-store 2020-04-27 16:45:57 -04:00
Damir Jelić
4df6099125 crypto: Test the Olm encryption. 2020-04-27 18:27:33 +02:00
Damir Jelić
b6c9358d14 crypto: Test the creation of an Olm session. 2020-04-27 16:31:28 +02:00
Damir Jelić
96144404ed crypto: Return a result when searching for missing sessions. 2020-04-27 16:26:03 +02:00
Devin R
8db05ace1e sync with state store after login to set path otherwise it makes 2x the folders 2020-04-27 08:10:43 -04:00
Devin R
199fb59a76 state_store: use tokio Mutex in state store tests 2020-04-27 07:23:59 -04:00
Devin R
6fcf0a86f9 Merge branch 'master' into state-store 2020-04-27 07:20:21 -04:00
Jonas Platte
6d67cd2ac7
Fix clippy lints 2020-04-27 12:12:51 +02:00
Jonas Platte
5cfac42101
Upgrade js_int to 0.1.5 2020-04-27 12:12:45 +02:00
Jonas Platte
4858ca5f74
Remove unnecessary clone 2020-04-27 11:52:49 +02:00
Devin R
55de913e08 state_store: use as many async fs functions as possible 2020-04-26 17:27:06 -04:00
Devin R
bb2d531525 state_store: clean up and add examples to docs 2020-04-26 17:13:55 -04:00
Devin R
8f57f73b66 command_bot: use JsonStore in example 2020-04-25 06:26:35 -04:00