浏览代码

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 1 周之前
父节点
当前提交
caff2affa6
共有 1 个文件被更改,包括 2 次插入2 次删除
  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,