Iterate types (#3156)

This commit is contained in:
Michael Telatynski
2023-02-15 13:38:41 +00:00
committed by GitHub
parent 195d1730bd
commit ad98706db4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -4131,12 +4131,12 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
roomId: string,
userId: string | string[],
powerLevel: number,
event: MatrixEvent,
event: MatrixEvent | null,
): Promise<ISendEventResponse> {
let content = {
users: {} as Record<string, number>,
};
if (event.getType() === EventType.RoomPowerLevels) {
if (event?.getType() === EventType.RoomPowerLevels) {
// take a copy of the content to ensure we don't corrupt
// existing client state with a failed power level change
content = utils.deepCopy(event.getContent());
+1 -1
View File
@@ -151,7 +151,7 @@ export interface ICryptoCallbacks {
requestId: string,
secretName: string,
deviceTrust: DeviceTrustLevel,
) => Promise<string>;
) => Promise<string | undefined>;
getDehydrationKey?: (keyInfo: ISecretStorageKeyInfo, checkFunc: (key: Uint8Array) => void) => Promise<Uint8Array>;
getBackupKey?: () => Promise<Uint8Array>;
}