@@ -494,6 +494,7 @@ describe("MatrixClient crypto", () => {
494494 aliTestClient . expectKeyQuery ( { device_keys : { [ aliUserId ] : { } } , failures : { } } ) ;
495495 await aliTestClient . start ( ) ;
496496 await bobTestClient . start ( ) ;
497+ bobTestClient . client . crypto . deviceList . downloadKeys = ( ) => Promise . resolve ( { } ) ;
497498 await firstSync ( aliTestClient ) ;
498499 await aliEnablesEncryption ( ) ;
499500 await aliSendsFirstMessage ( ) ;
@@ -504,6 +505,7 @@ describe("MatrixClient crypto", () => {
504505 aliTestClient . expectKeyQuery ( { device_keys : { [ aliUserId ] : { } } , failures : { } } ) ;
505506 await aliTestClient . start ( ) ;
506507 await bobTestClient . start ( ) ;
508+ bobTestClient . client . crypto . deviceList . downloadKeys = ( ) => Promise . resolve ( { } ) ;
507509 await firstSync ( aliTestClient ) ;
508510 await aliEnablesEncryption ( ) ;
509511 await aliSendsFirstMessage ( ) ;
@@ -567,6 +569,7 @@ describe("MatrixClient crypto", () => {
567569 aliTestClient . expectKeyQuery ( { device_keys : { [ aliUserId ] : { } } , failures : { } } ) ;
568570 await aliTestClient . start ( ) ;
569571 await bobTestClient . start ( ) ;
572+ bobTestClient . client . crypto . deviceList . downloadKeys = ( ) => Promise . resolve ( { } ) ;
570573 await firstSync ( aliTestClient ) ;
571574 await aliEnablesEncryption ( ) ;
572575 await aliSendsFirstMessage ( ) ;
@@ -584,6 +587,9 @@ describe("MatrixClient crypto", () => {
584587 await firstSync ( bobTestClient ) ;
585588 await aliEnablesEncryption ( ) ;
586589 await aliSendsFirstMessage ( ) ;
590+ bobTestClient . httpBackend . when ( 'POST' , '/keys/query' ) . respond (
591+ 200 , { } ,
592+ ) ;
587593 await bobRecvMessage ( ) ;
588594 await bobEnablesEncryption ( ) ;
589595 const ciphertext = await bobSendsReplyMessage ( ) ;
0 commit comments