From e5b1cbbcd3b05da1807d19fff78062b85f4333b2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 29 Sep 2020 11:32:49 +0200 Subject: [PATCH] prevent endless loop when restoring messages that were already sent --- src/matrix/room/sending/SendQueue.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/matrix/room/sending/SendQueue.js b/src/matrix/room/sending/SendQueue.js index 52c2e7b8..b256b496 100644 --- a/src/matrix/room/sending/SendQueue.js +++ b/src/matrix/room/sending/SendQueue.js @@ -48,6 +48,7 @@ export class SendQueue { const pendingEvent = this._pendingEvents.get(this._amountSent); console.log("trying to send", pendingEvent.content.body); if (pendingEvent.remoteId) { + this._amountSent += 1; continue; } if (pendingEvent.needsEncryption) {