From 7d271bb35ec2fad0bb27f70e0e668f8a8bb3b850 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) {