diff --git a/src/matrix/room/sending/PendingEvent.js b/src/matrix/room/sending/PendingEvent.js index ae51f457..3e7971e7 100644 --- a/src/matrix/room/sending/PendingEvent.js +++ b/src/matrix/room/sending/PendingEvent.js @@ -88,6 +88,11 @@ export class PendingEvent { this._emitUpdate("status"); } + setWaiting() { + this._status = SendStatus.Waiting; + this._emitUpdate("status"); + } + get status() { return this._status; } get error() { return this._error; } diff --git a/src/matrix/room/sending/SendQueue.js b/src/matrix/room/sending/SendQueue.js index fd8c45c1..c946a2f5 100644 --- a/src/matrix/room/sending/SendQueue.js +++ b/src/matrix/room/sending/SendQueue.js @@ -74,6 +74,7 @@ export class SendQueue { if (err instanceof ConnectionError) { this._offline = true; log.set("offline", true); + pendingEvent.setWaiting(); } else { log.catch(err); pendingEvent.setError(err);