Skip to content

[BUG] 好友列表(带分组)空白问题 #777

Description

@actiontome999-hash

系统版本

Win10 LTSC

QQNT 版本

9.9.30-48762

LLBot 版本

7.12.15

OneBot 客户端

No response

发生了什么?

getFriendList TypeError: Cannot read properties of undefined (reading 'toString')

错误日志:

TypeError: Cannot read properties of undefined (reading 'toString')
at (...\src\ntqqapi\api\friend.ts:39:36)
at Array.map ()
at Proxy.getFriendList (...\src\ntqqapi\api\friend.ts:23:42)
at async GetFriendWithCategory._handle (...\src\onebot11\action\llbot\user\GetFriendWithCategory.ts:19:20)
分析: getFriendList 的 .map() 回调中,某个好友对象的属性为 undefined,对其调用了 .toString()。疑似某个好友数据字段缺失(如 uin、uid 等),缺少空值保护。

如何复现

复现: 调用 get_friends_with_category action 时 看号触发

我两台电脑的QQ 一台正常显示QQ好友及列表 , 一台触发BUG为空

因为没办法获取到内部数据无法提供

期望的结果?

逻辑处理好,正常显示好友及列表

LLBot 运行日志

OneBot 客户端运行日志

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions