NapNeko / NapCatQQ

现代化的基于 NTQQ 的 Bot 协议端实现
https://napcat.napneko.icu
Other
2.67k stars 196 forks source link

[BUG] 接受包含视频的合并消息时报错 TypeError: Cannot read properties of undefined (reading 'url') #164

Closed 2455DD closed 4 months ago

2455DD commented 4 months ago

系统版本

Windows 11 专业版 23H2

QQNT 版本

9.9.12-25765

NapCat 版本

1.6.9

OneBot 客户端

Alicebot 0.10.0

发生了什么?

当Bot接收到的合并消息(type: forward)中存在视频消息(type: video)时,调用APIget_forward_msgs时Napcat命令行终端报错:

TypeError: Cannot read properties of undefined (reading 'url') at NTQQFileApi.getVideoUrl (file:///C:/Software/NapCat/napcat.mjs:9685:32) at async OB11Constructor.message (file:///C:/Software/NapCat/napcat.mjs:13912:53) at async file:///C:/Software/NapCat/napcat.mjs:24534:22 at async Promise.all (index 1)TypeError: Cannot read properties of undefined (reading 'url') at NTQQFileApi.getVideoUrl (file:///C:/Software/NapCat/napcat.mjs:9685:32) at async OB11Constructor.message (file:///C:/Software/NapCat/napcat.mjs:13912:53) at async file:///C:/Software/NapCat/napcat.mjs:24534:22 at async Promise.all (index 1) at async GoCQHTTPGetForwardMsgAction._handle (file:///C:/Software/NapCat/napcat.mjs:24533:22) at async GoCQHTTPGetForwardMsgAction.websocketHandle (file:///C:/Software/NapCat/napcat.mjs:21449:23) at async ReverseWebsocket.onmessage (file:///C:/Software/NapCat/napcat.mjs:26590:28) at async WebSocket. (file:///C:/Software/NapCat/napcat.mjs:26630:7) at async GoCQHTTPGetForwardMsgAction._handle (file:///C:/Software/NapCat/napcat.mjs:24533:22) at async GoCQHTTPGetForwardMsgAction.websocketHandle (file:///C:/Software/NapCat/napcat.mjs:21449:23) at async ReverseWebsocket.onmessage (file:///C:/Software/NapCat/napcat.mjs:26590:28) at async WebSocket. (file:///C:/Software/NapCat/napcat.mjs:26630:7)

如何复现

Bot接受包含视频的合并消息

期望的结果?

可以正常解析,不报错

NapCat 运行日志

2024-07-27 16:32:57 [INFO] **(**) | 群[**(**)] **(**): [未实现|{"data":{"id":"7396230793733768146"},"type":"forward"}] 
2024-07-27 16:32:57 [ERROR] **(**) | 发生错误 Error: 找不到相关的聊天记录Data Not Existed!
    at GoCQHTTPGetForwardMsgAction._handle (file:///C:/Software/NapCat/napcat.mjs:24530:13)
    at async GoCQHTTPGetForwardMsgAction.websocketHandle (file:///C:/Software/NapCat/napcat.mjs:21449:23)
    at async ReverseWebsocket.onmessage (file:///C:/Software/NapCat/napcat.mjs:26590:28)
    at async WebSocket.<anonymous> (file:///C:/Software/NapCat/napcat.mjs:26630:7)

OneBot 客户端运行日志

No response

MliKiowa commented 4 months ago

下个版本修

MliKiowa commented 4 months ago

已修

MliKiowa commented 4 months ago

之后如果新版本还有问题提issue