1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-18 05:42:00 +03:00

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.
This commit is contained in:
Kegan Dougal
2015-12-18 09:14:48 +00:00
parent 431f4a4797
commit da560ffeff

View File

@@ -1073,6 +1073,7 @@ function _sendEvent(client, room, event, callback) {
matchingEvent.event.type = event.event.type; matchingEvent.event.type = event.event.type;
} }
room.removeEvents([localEventId]); room.removeEvents([localEventId]);
matchingEvent.status = null; // make sure it's still marked as sent
} }
else { else {
room.removeEvents([localEventId]); room.removeEvents([localEventId]);