cleanup of ctor

This commit is contained in:
Bruno Windels 2022-10-28 16:31:00 +02:00
parent fcb1546fba
commit 6dbcd46d80

View File

@ -31,17 +31,14 @@ interface DecryptAllResult {
* Does the actual decryption of all events for a given megolm session in a batch * Does the actual decryption of all events for a given megolm session in a batch
*/ */
export class SessionDecryption { export class SessionDecryption {
private key: RoomKey;
private events: TimelineEvent[];
private keyLoader: KeyLoader;
private olmWorker?: OlmWorker;
private decryptionRequests?: any[]; private decryptionRequests?: any[];
constructor(key: RoomKey, events: TimelineEvent[], olmWorker: OlmWorker | undefined, keyLoader: KeyLoader) { constructor(
this.key = key; private readonly key: RoomKey,
this.events = events; private readonly events: TimelineEvent[],
this.olmWorker = olmWorker; private readonly olmWorker: OlmWorker | undefined,
this.keyLoader = keyLoader; private readonly keyLoader: KeyLoader
) {
this.decryptionRequests = olmWorker ? [] : undefined; this.decryptionRequests = olmWorker ? [] : undefined;
} }