1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

Fix importRoomKeys() definition

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-10-13 16:50:27 +02:00
parent 7559a10526
commit 0042cb5292
2 changed files with 3 additions and 3 deletions

View File

@@ -142,7 +142,7 @@ export interface IImportOpts {
} }
export interface IImportRoomKeysOpts { export interface IImportRoomKeysOpts {
progressCallback: (stage: IImportOpts) => void; progressCallback?: (stage: IImportOpts) => void;
untrusted?: boolean; untrusted?: boolean;
source?: string; // TODO: Enum source?: string; // TODO: Enum
} }

View File

@@ -40,7 +40,7 @@ import {
ISecretRequest, ISecretRequest,
SecretStorageKeyObject, SecretStorageKeyObject,
} from './SecretStorage'; } from './SecretStorage';
import { IAddSecretStorageKeyOpts, ISecretStorageKeyInfo } from "./api"; import { IAddSecretStorageKeyOpts, IImportRoomKeysOpts, ISecretStorageKeyInfo } from "./api";
import { OutgoingRoomKeyRequestManager } from './OutgoingRoomKeyRequestManager'; import { OutgoingRoomKeyRequestManager } from './OutgoingRoomKeyRequestManager';
import { IndexedDBCryptoStore } from './store/indexeddb-crypto-store'; import { IndexedDBCryptoStore } from './store/indexeddb-crypto-store';
import { ReciprocateQRCode, SCAN_QR_CODE_METHOD, SHOW_QR_CODE_METHOD } from './verification/QRCode'; import { ReciprocateQRCode, SCAN_QR_CODE_METHOD, SHOW_QR_CODE_METHOD } from './verification/QRCode';
@@ -2658,7 +2658,7 @@ export class Crypto extends EventEmitter {
* @param {Function} opts.progressCallback called with an object which has a stage param * @param {Function} opts.progressCallback called with an object which has a stage param
* @return {Promise} a promise which resolves once the keys have been imported * @return {Promise} a promise which resolves once the keys have been imported
*/ */
public importRoomKeys(keys: IMegolmSessionData[], opts: any = {}): Promise<any> { // TODO types public importRoomKeys(keys: IMegolmSessionData[], opts: IImportRoomKeysOpts = {}): Promise<any> { // TODO types
let successes = 0; let successes = 0;
let failures = 0; let failures = 0;
const total = keys.length; const total = keys.length;