Delay redacting events until we're online

This commit is contained in:
miruka 2020-07-10 12:43:21 -04:00
parent e5b67c722e
commit 5b9e84a9f7

View File

@ -1190,6 +1190,12 @@ class MatrixClient(nio.AsyncClient):
event.event_type = nio.RedactedEvent event.event_type = nio.RedactedEvent
while (
self.models["accounts"][self.user_id].presence ==
Presence.State.offline
):
await asyncio.sleep(0.2)
return await asyncio.gather(*tasks) return await asyncio.gather(*tasks)