@@ -494,6 +494,7 @@ describe("MatrixClient crypto", () => {
494
494
aliTestClient . expectKeyQuery ( { device_keys : { [ aliUserId ] : { } } , failures : { } } ) ;
495
495
await aliTestClient . start ( ) ;
496
496
await bobTestClient . start ( ) ;
497
+ bobTestClient . client . crypto . deviceList . downloadKeys = ( ) => Promise . resolve ( { } ) ;
497
498
await firstSync ( aliTestClient ) ;
498
499
await aliEnablesEncryption ( ) ;
499
500
await aliSendsFirstMessage ( ) ;
@@ -504,6 +505,7 @@ describe("MatrixClient crypto", () => {
504
505
aliTestClient . expectKeyQuery ( { device_keys : { [ aliUserId ] : { } } , failures : { } } ) ;
505
506
await aliTestClient . start ( ) ;
506
507
await bobTestClient . start ( ) ;
508
+ bobTestClient . client . crypto . deviceList . downloadKeys = ( ) => Promise . resolve ( { } ) ;
507
509
await firstSync ( aliTestClient ) ;
508
510
await aliEnablesEncryption ( ) ;
509
511
await aliSendsFirstMessage ( ) ;
@@ -567,6 +569,7 @@ describe("MatrixClient crypto", () => {
567
569
aliTestClient . expectKeyQuery ( { device_keys : { [ aliUserId ] : { } } , failures : { } } ) ;
568
570
await aliTestClient . start ( ) ;
569
571
await bobTestClient . start ( ) ;
572
+ bobTestClient . client . crypto . deviceList . downloadKeys = ( ) => Promise . resolve ( { } ) ;
570
573
await firstSync ( aliTestClient ) ;
571
574
await aliEnablesEncryption ( ) ;
572
575
await aliSendsFirstMessage ( ) ;
@@ -584,6 +587,9 @@ describe("MatrixClient crypto", () => {
584
587
await firstSync ( bobTestClient ) ;
585
588
await aliEnablesEncryption ( ) ;
586
589
await aliSendsFirstMessage ( ) ;
590
+ bobTestClient . httpBackend . when ( 'POST' , '/keys/query' ) . respond (
591
+ 200 , { } ,
592
+ ) ;
587
593
await bobRecvMessage ( ) ;
588
594
await bobEnablesEncryption ( ) ;
589
595
const ciphertext = await bobSendsReplyMessage ( ) ;
0 commit comments