server: Handle case where we receive a sent message first in a sync.
This commit is contained in:
parent
f57b1b32c0
commit
a34d1e68b0
1 changed files with 8 additions and 1 deletions
|
@ -953,7 +953,14 @@ class MatrixServer(object):
|
|||
room_buffer.last_read_event = response.event_id
|
||||
|
||||
room_buffer = self.room_buffers[response.room_id]
|
||||
message = room_buffer.sent_messages_queue.pop(response.uuid)
|
||||
|
||||
message = room_buffer.sent_messages_queue.pop(response.uuid, None)
|
||||
|
||||
# The message might have been returned in a sync response before we got
|
||||
# a room send response.
|
||||
if not message:
|
||||
return
|
||||
|
||||
message.event_id = response.event_id
|
||||
# We already printed the message, just modify it to contain the proper
|
||||
# colors and formatting.
|
||||
|
|
Loading…
Reference in a new issue