@@ -31,8 +31,6 @@ import {
31
31
UNSTABLE_MSC3088_PURPOSE ,
32
32
UNSTABLE_MSC3089_TREE_SUBTYPE ,
33
33
} from "../../src/@types/event" ;
34
- import { MEGOLM_ALGORITHM } from "../../src/crypto/olmlib" ;
35
- import { Crypto } from "../../src/crypto" ;
36
34
import { EventStatus , MatrixEvent } from "../../src/models/event" ;
37
35
import { Preset } from "../../src/@types/partials" ;
38
36
import { ReceiptType } from "../../src/@types/read_receipts" ;
@@ -76,6 +74,7 @@ import { ServerSideSecretStorageImpl } from "../../src/secret-storage";
76
74
import { KnownMembership } from "../../src/@types/membership" ;
77
75
import { RoomMessageEventContent } from "../../src/@types/events" ;
78
76
import { mockOpenIdConfiguration } from "../test-utils/oidc.ts" ;
77
+ import { CryptoBackend } from "../../src/common-crypto/CryptoBackend" ;
79
78
80
79
jest . useFakeTimers ( ) ;
81
80
@@ -1188,7 +1187,7 @@ describe("MatrixClient", function () {
1188
1187
type : EventType . RoomEncryption ,
1189
1188
state_key : "" ,
1190
1189
content : {
1191
- algorithm : MEGOLM_ALGORITHM ,
1190
+ algorithm : "m.megolm.v1.aes-sha2" ,
1192
1191
} ,
1193
1192
} ,
1194
1193
] ,
@@ -1914,7 +1913,7 @@ describe("MatrixClient", function () {
1914
1913
hasEncryptionStateEvent : jest . fn ( ) . mockReturnValue ( true ) ,
1915
1914
} as unknown as Room ;
1916
1915
1917
- let mockCrypto : Mocked < Crypto > ;
1916
+ let mockCrypto : Mocked < CryptoBackend > ;
1918
1917
1919
1918
let event : MatrixEvent ;
1920
1919
beforeEach ( async ( ) => {
@@ -1934,7 +1933,7 @@ describe("MatrixClient", function () {
1934
1933
isEncryptionEnabledInRoom : jest . fn ( ) . mockResolvedValue ( true ) ,
1935
1934
encryptEvent : jest . fn ( ) ,
1936
1935
stop : jest . fn ( ) ,
1937
- } as unknown as Mocked < Crypto > ;
1936
+ } as unknown as Mocked < CryptoBackend > ;
1938
1937
client [ "cryptoBackend" ] = mockCrypto ;
1939
1938
} ) ;
1940
1939
0 commit comments