Skip to content

Commit

Permalink
Remove roomId overload
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Aug 1, 2024
1 parent e10bc5a commit 47e52c1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/crypto/algorithms/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,16 @@ export abstract class EncryptionAlgorithm {
protected readonly crypto: Crypto;
protected readonly olmDevice: OlmDevice;
protected readonly baseApis: MatrixClient;
protected readonly roomId?: string;

/**
* @param params - parameters
*/
public constructor(params: IParams) {
public constructor(params: Omit<IParams, "roomId">) {
this.userId = params.userId;
this.deviceId = params.deviceId;
this.crypto = params.crypto;
this.olmDevice = params.olmDevice;
this.baseApis = params.baseApis;
this.roomId = params.roomId;
}

/**
Expand Down Expand Up @@ -127,14 +125,12 @@ export abstract class DecryptionAlgorithm {
protected readonly crypto: Crypto;
protected readonly olmDevice: OlmDevice;
protected readonly baseApis: MatrixClient;
protected readonly roomId?: string;

public constructor(params: DecryptionClassParams) {
public constructor(params: Omit<DecryptionClassParams, "roomId">) {
this.userId = params.userId;
this.crypto = params.crypto;
this.olmDevice = params.olmDevice;
this.baseApis = params.baseApis;
this.roomId = params.roomId;
}

/**
Expand Down

0 comments on commit 47e52c1

Please sign in to comment.