mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
dont store duplicated key values for replay detection
This commit is contained in:
parent
0dece5b04f
commit
bba53b3477
@ -66,10 +66,7 @@ export class DecryptionChanges {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!decryption) {
|
if (!decryption) {
|
||||||
txn.groupSessionDecryptions.set({
|
txn.groupSessionDecryptions.set(roomId, sessionId, messageIndex, {
|
||||||
roomId,
|
|
||||||
sessionId,
|
|
||||||
messageIndex,
|
|
||||||
eventId,
|
eventId,
|
||||||
timestamp
|
timestamp
|
||||||
});
|
});
|
||||||
|
@ -27,8 +27,8 @@ export class GroupSessionDecryptionStore {
|
|||||||
return this._store.get(encodeKey(roomId, sessionId, messageIndex));
|
return this._store.get(encodeKey(roomId, sessionId, messageIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
set(decryption) {
|
set(roomId, sessionId, messageIndex, decryption) {
|
||||||
decryption.key = encodeKey(decryption.roomId, decryption.sessionId, decryption.messageIndex);
|
decryption.key = encodeKey(roomId, sessionId, messageIndex);
|
||||||
this._store.put(decryption);
|
this._store.put(decryption);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user