Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图片消息的形式为表情包时,构造的 imageId 字符串的图片格式错误 #2803

Open
gebederry opened this issue Sep 20, 2023 · 3 comments

Comments

@gebederry
Copy link

gebederry commented Sep 20, 2023

问题描述

图片消息的形式为动图表情包 (isEmoji = true) 时,Mirai Code 构造的 imageId 字符串的图片格式错误。
如下方 mirai-console 的日志所示,bot 复读表情包消息,messageChain 中的 {82E979B5-0000-0000-2D59-F32E15D068B3}.jpg 应为 {82E979B5-0000-0000-2D59-F32E15D068B3}.gif
几个月前使用 2.14.0 版本时,这里没有问题,bot 进行复读的话,复读的内容也是表情包。
2.15.0+ 存在问题。

复现

发送一张动图表情包图片消息,bot 进行复读。

mirai-core 版本

2.16.0-RC (2.16.0-RC-dev-145)

系统日志

mirai-console 的日志
bot 进行复读

2023-09-20 13:40:17 V/Bot.2000000000: [Group A(550000000)] 大橙子(1680000000) -> [mirai:image:{82E979B5-0000-0000-2D59-F32E15D068B3}.jpg, width=300, height=340, size=3272383, type=GIF, isEmoji=true]
2023-09-20 13:40:20 V/Bot.2000000000: Group(550000000) <- [mirai:image:{82E979B5-0000-0000-2D59-F32E15D068B3}.jpg, width=300, height=340, size=3272383, type=JPG, isEmoji=true]

补充信息

几个月前用 mah SDK mirai-ts 写的复读表情包的 js 代码片段,那时使用的 2.14.0,一切都很正常。>.< 😵

if ( sender.id === 1770000000 && messageChain.some( ({ type, imageId }) => type === "Image" && imageId === "{14BB05F0-0000-0000-50BC-82ABAB316225}.gif" ) ) { reply(messageChain); }

现在 gif 变成了 jpg,bot 对表情包消息进行复读 messageChain 时,发的非表情包形式的 gif 动图,效果,不会自动播放。>.<

相关 issues, PRs
Nambers/MiraiCP#200 #2463
#2760 #2761

@gebederry
Copy link
Author

其实问题不大,在复读动图表情包时重构修正一下 messageChain 一样的。

@Karlatemp
Copy link
Member

Karlatemp commented Sep 22, 2023

请提供消息发送者所使用的QQ版本(什么平台(Windows?Android?Mac OS?),什么QQ(TIM?QQ?QQNT?)和版本号)

@gebederry
Copy link
Author

请提供消息发送者所使用的QQ版本(什么平台(Windows?Android?Mac OS?),什么QQ(TIM?QQ?QQNT?)和版本号)

  • Windows QQ NT 9.9.2-16736
  • iPhone TIM 3.4.6.674
  • iPhone QQ 8.9.80.631
  • Android 手机 QQ 8.9.78.12275
  • iPad QQ 8.9.80.631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants