diff --git a/src/matrix/e2ee/megolm/decryption/DecryptionChanges.js b/src/matrix/e2ee/megolm/decryption/DecryptionChanges.js index 5597aaf7..10a2da87 100644 --- a/src/matrix/e2ee/megolm/decryption/DecryptionChanges.js +++ b/src/matrix/e2ee/megolm/decryption/DecryptionChanges.js @@ -66,10 +66,7 @@ export class DecryptionChanges { } if (!decryption) { - txn.groupSessionDecryptions.set({ - roomId, - sessionId, - messageIndex, + txn.groupSessionDecryptions.set(roomId, sessionId, messageIndex, { eventId, timestamp }); diff --git a/src/matrix/storage/idb/stores/GroupSessionDecryptionStore.js b/src/matrix/storage/idb/stores/GroupSessionDecryptionStore.js index 99ededb9..8f8df3e7 100644 --- a/src/matrix/storage/idb/stores/GroupSessionDecryptionStore.js +++ b/src/matrix/storage/idb/stores/GroupSessionDecryptionStore.js @@ -27,8 +27,8 @@ export class GroupSessionDecryptionStore { return this._store.get(encodeKey(roomId, sessionId, messageIndex)); } - set(decryption) { - decryption.key = encodeKey(decryption.roomId, decryption.sessionId, decryption.messageIndex); + set(roomId, sessionId, messageIndex, decryption) { + decryption.key = encodeKey(roomId, sessionId, messageIndex); this._store.put(decryption); } }