From 830c300102e979e6ba9bcff6216efc4496fd491d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 20 Aug 2020 15:23:29 +0200 Subject: [PATCH] fix typo that broke the txn --- src/matrix/room/timeline/persistence/GapWriter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/matrix/room/timeline/persistence/GapWriter.js b/src/matrix/room/timeline/persistence/GapWriter.js index cfdefbd6..f64b1690 100644 --- a/src/matrix/room/timeline/persistence/GapWriter.js +++ b/src/matrix/room/timeline/persistence/GapWriter.js @@ -105,7 +105,7 @@ export class GapWriter { // e.g. order is moving away from the `from` point. let key = startKey; for (let i = 0; i < events.length; ++i) { - const event = events[0]; + const event = events[i]; key = key.nextKeyForDirection(direction); const eventStorageEntry = createEventEntry(key, this._roomId, event); const memberEvent = this._findMemberEvent(event.sender, state, events, i, direction);