From da560ffeffd20f247dad84ec04b30f0656c083d5 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 18 Dec 2015 09:14:48 +0000 Subject: [PATCH] Fix SYJS-38 - Events stuck in 'sending' state v1 used to clobber events after sending so `.status` would be `null`. v2 is smarter and just clobbers the `.event` data so references to the local echo event would reflect the new event. However, the `.status` in this case would still have the old value (SENDING), so make sure to reset it after the 200 OK from sending the event. --- lib/client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/client.js b/lib/client.js index eba62946c..50bec8400 100644 --- a/lib/client.js +++ b/lib/client.js @@ -1073,6 +1073,7 @@ function _sendEvent(client, room, event, callback) { matchingEvent.event.type = event.event.type; } room.removeEvents([localEventId]); + matchingEvent.status = null; // make sure it's still marked as sent } else { room.removeEvents([localEventId]);