@@ -17,7 +17,7 @@ limitations under the License.
1717import anotherjson from "another-json" ;
1818import * as RustSdkCryptoJs from "@matrix-org/matrix-sdk-crypto-wasm" ;
1919
20- import type { IEventDecryptionResult , IMegolmSessionData } from "../@types/crypto.ts" ;
20+ import type { IMegolmSessionData } from "../@types/crypto.ts" ;
2121import { KnownMembership } from "../@types/membership.ts" ;
2222import { type IDeviceLists , type IToDeviceEvent , type ReceivedToDeviceMessage } from "../sync-accumulator.ts" ;
2323import type { ToDeviceBatch , ToDevicePayload } from "../models/ToDeviceMessage.ts" ;
@@ -28,6 +28,7 @@ import {
2828 type BackupDecryptor ,
2929 type CryptoBackend ,
3030 DecryptionError ,
31+ type EventDecryptionResult ,
3132 type OnSyncCompletedData ,
3233} from "../common-crypto/CryptoBackend.ts" ;
3334import { type Logger , LogSpan } from "../logger.ts" ;
@@ -285,7 +286,7 @@ export class RustCrypto extends TypedEventEmitter<RustCryptoEvents, CryptoEventH
285286 await encryptor . encryptEvent ( event , this . globalBlacklistUnverifiedDevices , this . deviceIsolationMode ) ;
286287 }
287288
288- public async decryptEvent ( event : MatrixEvent ) : Promise < IEventDecryptionResult > {
289+ public async decryptEvent ( event : MatrixEvent ) : Promise < EventDecryptionResult > {
289290 const roomId = event . getRoomId ( ) ;
290291 if ( ! roomId ) {
291292 // presumably, a to-device message. These are normally decrypted in preprocessToDeviceMessages
@@ -2202,7 +2203,7 @@ class EventDecryptor {
22022203 public async attemptEventDecryption (
22032204 event : MatrixEvent ,
22042205 isolationMode : DeviceIsolationMode ,
2205- ) : Promise < IEventDecryptionResult > {
2206+ ) : Promise < EventDecryptionResult > {
22062207 // add the event to the pending list *before* attempting to decrypt.
22072208 // then, if the key turns up while decryption is in progress (and
22082209 // decryption fails), we will schedule a retry.
0 commit comments