From b844a26c41c7a9862e56425c0e2d2ce7a6496dc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 1 Nov 2018 12:47:58 +0100 Subject: [PATCH] server: Clear the encryption queue if we encounter an olm trust error. --- matrix/server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix/server.py b/matrix/server.py index 2567982..0feb787 100644 --- a/matrix/server.py +++ b/matrix/server.py @@ -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):