Merge branch 'clear_backlog_pending_on_error'

This commit is contained in:
Damir Jelić 2020-11-11 14:56:09 +01:00
commit 81be90c7c9

View file

@ -60,6 +60,7 @@ from nio import (
DeleteDevicesResponse, DeleteDevicesResponse,
TransportType, TransportType,
RoomMessagesResponse, RoomMessagesResponse,
RoomMessagesError,
EncryptionError, EncryptionError,
GroupEncryptionError, GroupEncryptionError,
OlmTrustError, OlmTrustError,
@ -1618,6 +1619,9 @@ class MatrixServer(object):
if isinstance(response, ErrorResponse): if isinstance(response, ErrorResponse):
self.handle_error_response(response) self.handle_error_response(response)
if isinstance(response, RoomMessagesError):
room_buffer = self.room_buffers[response.room_id]
room_buffer.backlog_pending = False
elif isinstance(response, ToDeviceResponse): elif isinstance(response, ToDeviceResponse):
try: try: