@@ -30,20 +30,18 @@ use ruma::{
30
30
encryption:: OneTimeKey ,
31
31
events:: dummy:: ToDeviceDummyEventContent ,
32
32
serde:: Raw ,
33
- to_device:: DeviceIdOrAllDevices ,
34
33
user_id, DeviceId , OwnedOneTimeKeyId , TransactionId , UserId ,
35
34
} ;
36
35
use serde:: Serialize ;
37
36
use serde_json:: { json, Value } ;
38
37
use tokio:: sync:: Mutex ;
39
38
40
39
use crate :: {
41
- machine:: tests,
42
40
olm:: PrivateCrossSigningIdentity ,
43
41
store:: { types:: Changes , CryptoStoreWrapper , MemoryStore } ,
44
42
types:: {
45
43
events:: { room:: encrypted:: ToDeviceEncryptedEventContent , ToDeviceEvent } ,
46
- requests:: { AnyOutgoingRequest , ToDeviceRequest } ,
44
+ requests:: AnyOutgoingRequest ,
47
45
DeviceKeys ,
48
46
} ,
49
47
utilities:: json_convert,
@@ -199,16 +197,7 @@ pub async fn send_and_receive_encrypted_to_device_test_helper(
199
197
. await
200
198
. expect ( "Should have encrypted the content" ) ;
201
199
202
- let request = ToDeviceRequest :: new (
203
- recipient. user_id ( ) ,
204
- DeviceIdOrAllDevices :: DeviceId ( recipient. device_id ( ) . to_owned ( ) ) ,
205
- "m.room.encrypted" ,
206
- raw_encrypted. cast ( ) ,
207
- ) ;
208
- let event = ToDeviceEvent :: new (
209
- sender. user_id ( ) . to_owned ( ) ,
210
- tests:: to_device_requests_to_content ( vec ! [ request. clone( ) . into( ) ] ) ,
211
- ) ;
200
+ let event = ToDeviceEvent :: new ( sender. user_id ( ) . to_owned ( ) , raw_encrypted) ;
212
201
213
202
let event = json_convert ( & event) . unwrap ( ) ;
214
203
0 commit comments