load_past_events: Catch RoomMessagesError
This commit is contained in:
parent
3ef32b4c04
commit
6b26aa6d0b
|
@ -222,7 +222,7 @@ class MatrixClient(nio.AsyncClient):
|
|||
)
|
||||
|
||||
if isinstance(response, nio.RoomSendError):
|
||||
log.error("Failed to send message: %s", response)
|
||||
log.error("Sending message failed: %s", response)
|
||||
|
||||
|
||||
async def load_past_events(self, room_id: str) -> bool:
|
||||
|
@ -239,6 +239,11 @@ class MatrixClient(nio.AsyncClient):
|
|||
limit = 100 if room_id in self.loaded_once_rooms else 25,
|
||||
)
|
||||
|
||||
if isinstance(response, nio.RoomMessagesError):
|
||||
log.error("Loading past messages for room %s failed: %s",
|
||||
room_id, response)
|
||||
return True
|
||||
|
||||
self.loaded_once_rooms.add(room_id)
|
||||
more_to_load = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user