this should be a map

This commit is contained in:
Bruno Windels 2020-10-05 17:06:29 +02:00
parent b2e6310775
commit c8e4dbc1b3

View file

@ -89,7 +89,7 @@ export class RoomEncryption {
// but we want to be able to map it back to something in the timeline easily
// when retrying decryption.
async prepareDecryptAll(events, source, isTimelineOpen, txn) {
const errors = [];
const errors = new Map();
const validEvents = [];
for (const event of events) {
if (event.redacted_because || event.unsigned?.redacted_because) {