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

ForwardMessage消息长度计算问题 #2002

Open
Deficuet opened this issue May 2, 2022 · 6 comments · May be fixed by #2437
Open

ForwardMessage消息长度计算问题 #2002

Deficuet opened this issue May 2, 2022 · 6 comments · May be fixed by #2437
Labels
N 优先级: 一般 s:core 子系统: mirai-core t:problem 类型: 不容易归类为特性或 bug 的综合问题
Milestone

Comments

@Deficuet
Copy link

Deficuet commented May 2, 2022

问题描述

单条消息最大可发送 4500 字符或 50 张图片

这个我是知道的,但是对合并转发也遵循这条规则就多少有些诡异(
普通用户是能够多选100张图片合并转发的,我也正常收到过100条全是图片的合并转发
但是由bot构造一个含有大于50张图片的合并转发,发送时会报消息超长的错。是有意为之吗?
姑且当bug讨论吧(

复现

通过DSL随意构造一个含有大于50张图片的合并转发并尝试发送

mirai-core 版本

2.10.1

bot-protocol

ANDROID_PHONE

其他组件版本

No response

系统日志

No response

网络日志

No response

补充信息

No response

@Him188 Him188 added N 优先级: 一般 t:problem 类型: 不容易归类为特性或 bug 的综合问题 s:core 子系统: mirai-core labels May 2, 2022
@Him188 Him188 added this to the Backlog milestone May 2, 2022
@Him188
Copy link
Member

Him188 commented May 2, 2022

普通消息标准限制是5000字符左右+10张图片。mirai因为无法按服务器标准精准控制字符数,就限制在5000字符,但给图片的限制提高到了50。

合并转发的限制大约是总数据不能超过 1M。合并转发有可能是可以允许100图片的。

@landall
Copy link

landall commented May 5, 2022

普通消息标准限制是5000字符_左右_+10张图片。mirai因为无法按服务器标准精准控制字符数,就限制在5000字符,但给图片的限制提高到了50。

合并转发的限制_大约_是总数据不能超过 1M。合并转发有可能是可以允许100图片的。

冷知识:转发100张图片的,基本上都是色图合集,而且往往质量不高,wwww

@Nambers
Copy link
Contributor

Nambers commented May 5, 2022

普通消息标准限制是5000字符_左右_+10张图片。mirai因为无法按服务器标准精准控制字符数,就限制在5000字符,但给图片的限制提高到了50。

合并转发的限制_大约_是总数据不能超过 1M。合并转发有可能是可以允许100图片的。

那是否能给个force send呢? 就是如果mirai无法查明数据大小就交给用户判断,然后不保证发送结果(

@Him188 Him188 modified the milestones: Backlog, 2.14 Jul 30, 2022
@Him188
Copy link
Member

Him188 commented Jul 30, 2022

将会提高图片数量限制到 200

@Him188 Him188 modified the milestones: 2.14, 2.14.0-RC Sep 23, 2022
@Him188
Copy link
Member

Him188 commented Nov 27, 2022

看了下代码, 目前的限制是一个合并转发可以包含 200 条消息, 每条消息可以包含 50 张图片. 你的问题可能是使用了合并转发但这个转发内只有一条有超过 50 张图片的消息.

@Him188 Him188 added the z:wait-for-reply 状态: 等待回复 label Nov 27, 2022
@Deficuet
Copy link
Author

不是,是每条消息(Node)只有一张图。提这个issue的时候,合并转发里塞了大于五十条这样的消息会报这个错

@Him188 Him188 removed the z:wait-for-reply 状态: 等待回复 label Nov 27, 2022
@Him188 Him188 self-assigned this Jan 15, 2023
@Karlatemp Karlatemp modified the milestones: 2.14.0-RC, 2.15 Jan 18, 2023
@Him188 Him188 modified the milestones: 2.15, 2.15.0-RC Jan 18, 2023
@Him188 Him188 linked a pull request Mar 29, 2023 that will close this issue
@Him188 Him188 modified the milestones: 2.15.0-RC, 2.16.0-RC Mar 29, 2023
@Him188 Him188 modified the milestones: 2.16.0-RC, Backlog Aug 24, 2023
@Him188 Him188 removed their assignment Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
N 优先级: 一般 s:core 子系统: mirai-core t:problem 类型: 不容易归类为特性或 bug 的综合问题
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants