You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Iterate types (#3156)
This commit is contained in:
committed by
GitHub
parent
195d1730bd
commit
ad98706db4
@@ -4131,12 +4131,12 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
|
|||||||
roomId: string,
|
roomId: string,
|
||||||
userId: string | string[],
|
userId: string | string[],
|
||||||
powerLevel: number,
|
powerLevel: number,
|
||||||
event: MatrixEvent,
|
event: MatrixEvent | null,
|
||||||
): Promise<ISendEventResponse> {
|
): Promise<ISendEventResponse> {
|
||||||
let content = {
|
let content = {
|
||||||
users: {} as Record<string, number>,
|
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
|
// take a copy of the content to ensure we don't corrupt
|
||||||
// existing client state with a failed power level change
|
// existing client state with a failed power level change
|
||||||
content = utils.deepCopy(event.getContent());
|
content = utils.deepCopy(event.getContent());
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ export interface ICryptoCallbacks {
|
|||||||
requestId: string,
|
requestId: string,
|
||||||
secretName: string,
|
secretName: string,
|
||||||
deviceTrust: DeviceTrustLevel,
|
deviceTrust: DeviceTrustLevel,
|
||||||
) => Promise<string>;
|
) => Promise<string | undefined>;
|
||||||
getDehydrationKey?: (keyInfo: ISecretStorageKeyInfo, checkFunc: (key: Uint8Array) => void) => Promise<Uint8Array>;
|
getDehydrationKey?: (keyInfo: ISecretStorageKeyInfo, checkFunc: (key: Uint8Array) => void) => Promise<Uint8Array>;
|
||||||
getBackupKey?: () => Promise<Uint8Array>;
|
getBackupKey?: () => Promise<Uint8Array>;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user