server: Clear the encryption queue if we encounter an olm trust error.

This commit is contained in:
Damir Jelić 2018-11-01 12:47:58 +01:00
parent ec995e6c8f
commit b844a26c41

View file

@ -1076,6 +1076,7 @@ class MatrixServer(object):
m = ("Untrusted devices found in room: {}".format(e))
room_buffer = self.find_room_from_id(response.room_id)
room_buffer.error(m)
self.encryption_queue[response.room_id].clear()
return
self.send(request)
@ -1095,6 +1096,7 @@ class MatrixServer(object):
self.encryption_queue[room_id].appendleft(message)
break
except OlmTrustError:
self.encryption_queue[room_id].clear()
break
def create_room_buffer(self, room_id, prev_batch):