From 25ce06c9d5a4f9d05e7d098909d53ea1dbe62dcb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 31 May 2021 15:55:31 +0200 Subject: [PATCH] clarify --- src/matrix/room/sending/SendQueue.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/sending/SendQueue.js b/src/matrix/room/sending/SendQueue.js index d47b8030..7a648171 100644 --- a/src/matrix/room/sending/SendQueue.js +++ b/src/matrix/room/sending/SendQueue.js @@ -100,8 +100,9 @@ export class SendQueue { if (pendingEvent.needsSending) { await pendingEvent.send(this._hsApi, log); // we now have a remoteId, but this pending event may be removed at any point in the future - // once the remote echo comes in. So if we have any related events that need to resolve - // the relatedTxnId to a related event id, they need to do so now. + // (or past, so can't assume it still exists) once the remote echo comes in. + // So if we have any related events that need to resolve the relatedTxnId to a related event id, + // they need to do so now. // We ensure this by writing the new remote id for the pending event and all related events // with unresolved relatedTxnId in the queue in one transaction. const txn = await this._storage.readWriteTxn([this._storage.storeNames.pendingEvents]);