koishijs / koishi-plugin-booru

Image service for Koishi | 最好的涩图插件!
https://booru.koishi.chat
MIT License
12 stars 7 forks source link

Bug: 无法发送复数张图片 #124

Closed CaoMeiYouRen closed 9 months ago

CaoMeiYouRen commented 9 months ago

Describe the bug

可以正常发送单张图片,但在两张以上的时候会出现消息源码。 在钉钉、企业微信平台表现为发送消息源码;在onebot平台为发送错误,没有返回消息。

Steps to reproduce

booru -c 1 # 此时会正常返回1张图片
booru -c 2 # 此时会返回消息源码

Expected behavior

应当正常返回指定数量的图片

Screenshots

image image image image

Relevant log output

2023-11-29 10:45:46 [W] session Error: Error with request send_private_forward_msg, args: {"user_id":123456,"messages":[{"type":"node","data":{"name":"香风友希子","uin":"xxxxxx","content":[{"type":"text","data":{"text":"<message><image url=\"https://i.pixiv.re/img-original/img/2020/11/03/20/57/58/85441461_p0.jpg\"/></message>\n<message><image url=\"https://i.pixiv.re/img-original/img/2022/07/24/00/00/08/99945802_p0.jpg\"/></message>"}}],"time":"1701225945"}}]}, retcode: 103
                            at Internal._get (/koishi/node_modules/koishi-plugin-adapter-onebot/lib/types.js:41:15)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                            at async Internal.<computed> [as sendPrivateForwardMsg] (/koishi/node_modules/koishi-plugin-adapter-onebot/lib/types.js:81:26)
                            at async OneBotMessageEncoder.forward (/koishi/node_modules/koishi-plugin-adapter-onebot/lib/bot/message.js:22:20)
                            at async OneBotMessageEncoder.visit (/koishi/node_modules/koishi-plugin-adapter-onebot/lib/bot/message.js:217:17)
                            at async OneBotMessageEncoder.render (/koishi/node_modules/@satorijs/core/lib/index.cjs:544:7)
                            at async OneBotMessageEncoder.send (/koishi/node_modules/@satorijs/core/lib/index.cjs:576:5)
                            at async OneBotBot.sendMessage (/koishi/node_modules/@satorijs/core/lib/index.cjs:338:22)
                            at async /koishi/node_modules/@koishijs/core/lib/index.cjs:2192:7
                            at async Proxy.withScope (/koishi/node_modules/@koishijs/core/lib/index.cjs:2087:22)

Launcher

Containers (Docker, Kubernates, etc)

Sources

Lolicon

Versions

Additional context

Lipraty commented 9 months ago

I cannot reproduce it. This can be caused by the inability of the adapter to handle nested <message> elements.

image

CaoMeiYouRen commented 9 months ago

I cannot reproduce it. This can be caused by the inability of the adapter to handle nested <message> elements.

image

在沙盒中也是这样的 image

Lipraty commented 9 months ago

However, the OneBot adapter is no longer actively being developed, DingTalk with WeCom adapter by LittleC.

https://github.com/whitechi73/OpenShamrock/issues/64#issuecomment-1821427719

既然这个 issue 已经关闭,你可以去 koishi-plugin-adapter-onebot 再发一个 issue。但 onebot 适配器已经不积极维护了,可以等待有缘人来研究(

https://github.com/koishijs/koishi-plugin-adapter-onebot/issues/5

cc @XxLittleCxX

Lipraty commented 9 months ago

在沙盒中也是这样的 image

please upgrade sandbox plugin.

CaoMeiYouRen commented 9 months ago

在沙盒中也是这样的 image

please upgrade sandbox plugin.

HI,所有插件均已升级到最新,依旧是这样的 image image

Lipraty commented 9 months ago

We have discovered that the releases packages without applying the most recent modifications and incorrectly publishes a version that is still being edited. Please wait for the latest version to be released.

Thanks for your issue.

Lipraty commented 9 months ago

Maybe that's why we cannot replicate the issue, as a local development version is employed.

Lipraty commented 9 months ago

New version has been released, please wait for the marketplace to be updated and try again.

CaoMeiYouRen commented 9 months ago

New version has been released, please wait for the marketplace to be updated and try again.

感谢,问题已解决。企业微信、钉钉、沙盒中都可以正常返回了。