From 4077f57afb63bcdbd40c7cc68d8d58ea16db0c7c Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 31 Aug 2020 16:09:13 +0200 Subject: [PATCH] fix typos in stores --- src/matrix/storage/idb/stores/DeviceIdentityStore.js | 2 +- src/matrix/storage/idb/stores/RoomMemberStore.js | 2 +- src/matrix/storage/idb/stores/UserIdentityStore.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/matrix/storage/idb/stores/DeviceIdentityStore.js b/src/matrix/storage/idb/stores/DeviceIdentityStore.js index 8bbab1b7..aec337fc 100644 --- a/src/matrix/storage/idb/stores/DeviceIdentityStore.js +++ b/src/matrix/storage/idb/stores/DeviceIdentityStore.js @@ -36,6 +36,6 @@ export class DeviceIdentityStore { set(deviceIdentity) { deviceIdentity.key = encodeKey(deviceIdentity.userId, deviceIdentity.deviceId); - return this._store.set(deviceIdentity); + return this._store.put(deviceIdentity); } } diff --git a/src/matrix/storage/idb/stores/RoomMemberStore.js b/src/matrix/storage/idb/stores/RoomMemberStore.js index 75649935..be2b16ec 100644 --- a/src/matrix/storage/idb/stores/RoomMemberStore.js +++ b/src/matrix/storage/idb/stores/RoomMemberStore.js @@ -50,7 +50,7 @@ export class RoomMemberStore { const userIds = []; const range = IDBKeyRange.lowerBound(encodeKey(roomId, "")); await this._roomMembersStore.iterateKeys(range, key => { - const decodedKey = decodedKey(key); + const decodedKey = decodeKey(key); // prevent running into the next room if (decodedKey.roomId === roomId) { userIds.push(decodedKey.userId); diff --git a/src/matrix/storage/idb/stores/UserIdentityStore.js b/src/matrix/storage/idb/stores/UserIdentityStore.js index 2eadefec..1cf6d636 100644 --- a/src/matrix/storage/idb/stores/UserIdentityStore.js +++ b/src/matrix/storage/idb/stores/UserIdentityStore.js @@ -24,10 +24,10 @@ export class UserIdentityStore { } set(userIdentity) { - return this._store.set(userIdentity); + this._store.put(userIdentity); } remove(userId) { - return this._eventStore.delete(userId); + return this._store.delete(userId); } }