From 5fbce3b9287e4cc7e2f8e41a69c130bb1bb490d4 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 7 Jul 2021 21:18:14 +0100 Subject: [PATCH] Consistent values between various account data interfaces --- src/crypto/EncryptionSetup.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crypto/EncryptionSetup.ts b/src/crypto/EncryptionSetup.ts index 406abc512..278a17ed4 100644 --- a/src/crypto/EncryptionSetup.ts +++ b/src/crypto/EncryptionSetup.ts @@ -246,7 +246,7 @@ export class EncryptionSetupOperation { * implementing the methods related to account data in MatrixClient */ class AccountDataClientAdapter extends EventEmitter { - public readonly values = new Map(); + public readonly values = new Map(); /** * @param {Object.} existingValues existing account data @@ -259,7 +259,7 @@ class AccountDataClientAdapter extends EventEmitter { * @param {String} type * @return {Promise} the content of the account data */ - public getAccountDataFromServer(type: string): Promise { + public getAccountDataFromServer(type: string): Promise { return Promise.resolve(this.getAccountData(type)); } @@ -267,7 +267,7 @@ class AccountDataClientAdapter extends EventEmitter { * @param {String} type * @return {Object} the content of the account data */ - public getAccountData(type: string): object { + public getAccountData(type: string): MatrixEvent { const modifiedValue = this.values.get(type); if (modifiedValue) { return modifiedValue; @@ -284,7 +284,7 @@ class AccountDataClientAdapter extends EventEmitter { * @param {Object} content * @return {Promise} */ - public setAccountData(type: string, content: object): Promise { + public setAccountData(type: string, content: any): Promise { const lastEvent = this.values.get(type); this.values.set(type, content); // ensure accountData is emitted on the next tick,