Commit graph

429 commits

Author SHA1 Message Date
Devin R
23755b10ab state_store: add user_id localpart to state store path from session 2020-04-24 19:57:51 -04:00
Damir Jelić
4f3eaa6537 Merge branch 'tomb' 2020-04-24 12:59:44 +02:00
Devin R
316295bb77 state_store: add initial_use to let client know its safe to load state 2020-04-23 22:09:42 -04:00
Devin R
183fffe85e Merge branch 'master' of state-store 2020-04-23 21:53:13 -04:00
Devin R
030aa79750 state_store: add method to manually sync state store, AsyncClient::sync now initially syncs with state store 2020-04-23 19:37:27 -04:00
Devin R
fd7d3db32b state_store: move path into JsonStore, store must be "connected" before adding to AsyncClientConfig 2020-04-23 16:40:23 -04:00
Devin R
8a8f590788 room: tests for calculate_room 2020-04-23 09:55:59 -04:00
Damir Jelić
6d12ed2046 async_client: Don't request a write lock for crypto based requests.
The crypto state machine is in the base client behind a separate lock so
there's no need to require write access.

This removes a deadlock if we're trying to send an encrypted message
from a event emitter callback, since emitting an event fetches a read
lock as well.
2020-04-23 14:56:59 +02:00
Devin R
07053cfe26 room/ev_emitter: add tombstone to emitted events 2020-04-23 07:05:59 -04:00
Devin R
ef4d69b0ac room: fix broken calculate_name, used UInt::max needed min, heroes is always empty 2020-04-23 06:53:34 -04:00
Devin R
305633635d room: add tombstone event handling 2020-04-23 06:51:29 -04:00
Damir Jelić
986985464a rust-sdk: Remove some unused imports. 2020-04-23 12:43:59 +02:00
Damir Jelić
a16d3b3d29 crypto: Don't instrument the debug implementation. 2020-04-23 11:58:21 +02:00
Damir Jelić
cb235c47a1 machine: Remove a deadlock when decrypting Olm messages using an existing session. 2020-04-23 11:37:47 +02:00
Damir Jelić
1de791c207 rust-sdk: Update to the latest ruma releases. 2020-04-23 10:52:47 +02:00
Devin R
5491838228 state_store: fix docs, test client with default state store 2020-04-22 17:39:57 -04:00
Damir Jelić
4369d0b854 crypto: Return a EncryptedEventContent when encrypting using Olm instead of a specific one. 2020-04-22 15:38:42 +02:00
Damir Jelić
b56b720c0c crypto: Return a EncryptedEventContent when encrypting instead of a specific one. 2020-04-22 15:22:43 +02:00
Damir Jelić
27ae8bccb9 crypto: Check the recipient and recipient keys for decrypted events. 2020-04-22 15:15:08 +02:00
Damir Jelić
0eab02a941 crypto: Remove a stale comment. 2020-04-22 13:43:45 +02:00
Damir Jelić
4576e93663 crypto: Add some more debug logs. 2020-04-22 12:54:49 +02:00
Damir Jelić
cb6e43b340 crypto: Allow devices to be deleted from the crypto store. 2020-04-22 12:12:47 +02:00
Devin R
ad7a18d50a state_store: remove associated Store type 2020-04-21 09:47:36 -04:00
Devin R
267453de4d state_store: add Path to StateStore methods, remove associated Error type 2020-04-21 09:36:59 -04:00
Devin R
1f173b4919 Merge branch 'master' into state-store 2020-04-21 08:29:25 -04:00
Damir Jelić
877b880ded crypto: Expose the devices publicly. 2020-04-21 11:03:28 +02:00
Damir Jelić
2f7ec887ba crypto: Clean up the imports. 2020-04-21 10:41:08 +02:00
Damir Jelić
6b33bedcbe Cargo.toml: Use the released version of olm-rs. 2020-04-21 09:54:41 +02:00
Damir Jelić
7b84f16bd3 crypto: Test key querying. 2020-04-21 09:45:46 +02:00
Damir Jelić
c057d6c6ad crypto: Add a method to remove devices from our DeviceStore. 2020-04-21 09:45:20 +02:00
Damir Jelić
00f4dadbbb crypto: Clean up the key querying logic. 2020-04-21 09:44:44 +02:00
Damir Jelić
7c54ad5c5f crypto: Allow a device to be marked as deleted. 2020-04-21 09:40:50 +02:00
Damir Jelić
63c0aa8771 crypto: Allow a device to be updated. 2020-04-21 09:31:33 +02:00
Damir Jelić
b572381a8e crypto: Save the device to the sqlite db. 2020-04-21 09:28:26 +02:00
Devin R
8f89e8335c state_store: add load_all_rooms, fix clippy warnings 2020-04-19 15:26:10 -04:00
Devin R
9fb4bd9d19 state_store: add associated store and error type, custom deserialization for ruma event types 2020-04-18 18:06:30 -04:00
Devin R
d000996205 Merge branch 'master' of https://github.com/matrix-org/matrix-rust-sdk into state-store 2020-04-18 15:22:02 -04:00
Damir Jelić
001a0de00f crypto: Test getting all user devices in the sqlite store as well. 2020-04-17 15:30:53 +02:00
Damir Jelić
a632f2e5a2 crypto: Implement the device store for the sql store. 2020-04-17 14:14:31 +02:00
Damir Jelić
6952acddc2 base_client: Remove a unused import. 2020-04-17 10:57:09 +02:00
Devin R
31fb702140 room: confirm spec accuracy 2020-04-16 22:07:12 -04:00
Devin R
ebe4f03c36 room: implement room_name according to spec, add RoomSummary to RoomName 2020-04-16 21:00:50 -04:00
Devin R
bd3b0e7b74 async_client: add login failure test, make sure we are getting correct error 2020-04-16 17:03:40 -04:00
Devin R
07b7cbfe4e async_client: name associated error type in AsyncClient::send 2020-04-16 16:39:44 -04:00
Devin R
c0e1ff1734 async_client/error: dont swallow response error in AsyncClient::send 2020-04-16 15:29:35 -04:00
Devin R
7889da2b30 state_store: very rough draft of json store 2020-04-16 10:02:59 -04:00
Damir Jelić
d91de818ac crypto: Don't try to create the sqlite index every time we open the db. 2020-04-16 13:57:33 +02:00
Damir Jelić
9444f1506d crypto: Test the loading of specific group sessions in the sqlite store. 2020-04-16 13:32:04 +02:00
Damir Jelić
5b212a2fcd crypto: Keep the tempdir alive in the sqlite store tests. 2020-04-16 13:21:57 +02:00
Damir Jelić
8e3c5889bb crypto: Make sure to load the all the sender sessions when saving a session. 2020-04-16 13:14:14 +02:00