Browse Source

Broadcast OFFLINE presence on disconnect

disconnect() sent PresenceStatus.ONLINE, so the bot stayed online in the
member list after shutdown, contradicting its own log message.
Paul Klumpp 1 week ago
parent
commit
c34cffb90a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      adapter.py

+ 2 - 2
adapter.py

@@ -298,10 +298,10 @@ class ChattoAdapter(BasePlatformAdapter):
 
         BasePlatformAdapter override
         """
-        # Broadcast away presence before tearing down
+        # Broadcast offline presence before tearing down
         try:
             client = await self._require_client()
-            await client.update_presence(status=PresenceStatus.ONLINE)
+            await client.update_presence(status=PresenceStatus.OFFLINE)
         except Exception:
             logger.debug("Chatto: update_presence(PresenceStatus.OFFLINE) failed on disconnect", exc_info=True)