Fix forgetting already left room

This commit is contained in:
miruka 2021-04-13 15:34:32 -04:00
parent 7db0e07281
commit fb84ea41c5

View File

@ -1180,8 +1180,9 @@ class MatrixClient(nio.AsyncClient):
try:
await super().room_leave(room_id)
except MatrixNotFound: # already left
pass
except MatrixError as e: # room was already left
if e.http_code != 404:
raise
await super().room_forget(room_id)