server: Clear the encryption queue if we encounter an olm trust error.
This commit is contained in:
parent
ec995e6c8f
commit
b844a26c41
1 changed files with 2 additions and 0 deletions
|
@ -1076,6 +1076,7 @@ class MatrixServer(object):
|
||||||
m = ("Untrusted devices found in room: {}".format(e))
|
m = ("Untrusted devices found in room: {}".format(e))
|
||||||
room_buffer = self.find_room_from_id(response.room_id)
|
room_buffer = self.find_room_from_id(response.room_id)
|
||||||
room_buffer.error(m)
|
room_buffer.error(m)
|
||||||
|
self.encryption_queue[response.room_id].clear()
|
||||||
return
|
return
|
||||||
|
|
||||||
self.send(request)
|
self.send(request)
|
||||||
|
@ -1095,6 +1096,7 @@ class MatrixServer(object):
|
||||||
self.encryption_queue[room_id].appendleft(message)
|
self.encryption_queue[room_id].appendleft(message)
|
||||||
break
|
break
|
||||||
except OlmTrustError:
|
except OlmTrustError:
|
||||||
|
self.encryption_queue[room_id].clear()
|
||||||
break
|
break
|
||||||
|
|
||||||
def create_room_buffer(self, room_id, prev_batch):
|
def create_room_buffer(self, room_id, prev_batch):
|
||||||
|
|
Loading…
Add table
Reference in a new issue