Procházet zdrojové kódy

Detect DMs in get_chat_info() via RoomKind

The comparison was against the string "ROOM_KIND_DM" while _room_kinds
holds RoomKind enum members, so every chat was reported as "group".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Paul-Dieter Klumpp před 1 týdnem
rodič
revize
caff2affa6
1 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 2 2
      adapter.py

+ 2 - 2
adapter.py

@@ -817,8 +817,8 @@ class ChattoAdapter(BasePlatformAdapter):
         BasePlatformAdapter override
         """
         name = self._room_names.get(chat_id, chat_id)
-        kind = self._room_kinds.get(chat_id, "")
-        chat_type = "dm" if kind == "ROOM_KIND_DM" else "group"
+        kind = self._room_kinds.get(chat_id)
+        chat_type = "dm" if kind == RoomKind.DM else "group"
         return {
             "name": name,
             "type": chat_type,