Fix offline → online not sending pending message

This commit is contained in:
miruka 2020-07-10 12:31:17 -04:00
parent 79fdc710c3
commit f018b9567b

View File

@ -522,8 +522,10 @@ class MatrixClient(nio.AsyncClient):
mentions = mentions,
)
presence = self.models["accounts"][self.user_id].presence
while presence == Presence.State.offline:
while (
self.models["accounts"][self.user_id].presence ==
Presence.State.offline
):
await asyncio.sleep(0.2)
await self._send_message(room_id, content, tx_id)