We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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中的Node对象自定义senderName失效.传入参数无法使其生效.即: ForwardMessage.Node node = new ForwardMessage.Node(memberId, (int) System.currentTimeMillis() / 1000, "senderName", messageChain); 其中"senderName"无法生效.2.12.1版本出现,切换老版本测试即:2.10.0,正常.
ForwardMessage.Node node = new ForwardMessage.Node(memberId, (int) System.currentTimeMillis() / 1000, "senderName", messageChain);
private static void test(Contact contact, long memberId, List<MessageChain> list) { List<ForwardMessage.Node> nodes = new ArrayList<>(); List<String> strList = new ArrayList<>(4); for (MessageChain messageChain : list) { ForwardMessage.Node node = new ForwardMessage.Node(memberId, (int) System.currentTimeMillis() / 1000, "senderName", messageChain); nodes.add(node); if (strList.size() <= 4) { strList.add(messageChain.contentToString()); } } ForwardMessage forwardMessage = new ForwardMessage(strList, memberId + "的聊天记录", "[聊天记录]", "聊天记录", "查看" + list.size() + "条转发消息", nodes); contact.sendMessage(forwardMessage); }
以上为测试代码,同样的代码可以切换成版本2.10.0跑即可正常.
2.12.1
ANDROID_PHONE
无报错.
No response
The text was updated successfully, but these errors were encountered:
951e835
[core] Fix sender name in forwarded messages. close #2187
e44e387
(cherry picked from commit 951e835)
No branches or pull requests
问题描述
构建ForwardMessage中的Node对象自定义senderName失效.传入参数无法使其生效.即:
ForwardMessage.Node node = new ForwardMessage.Node(memberId, (int) System.currentTimeMillis() / 1000, "senderName", messageChain);
其中"senderName"无法生效.2.12.1版本出现,切换老版本测试即:2.10.0,正常.
复现
以上为测试代码,同样的代码可以切换成版本2.10.0跑即可正常.
mirai-core 版本
2.12.1
bot-protocol
ANDROID_PHONE
其他组件版本
net.mamoe mirai-core-jvm 2.12.0系统日志
网络日志
补充信息
No response
The text was updated successfully, but these errors were encountered: