feat(mp): 新增被动回复消息「转接AI回复」支持 (transfer_biz_ai_ivr)#3879
Open
feat(mp): 新增被动回复消息「转接AI回复」支持 (transfer_biz_ai_ivr)#3879
Conversation
- 在 WxConsts.XmlMsgType 中新增 TRANSFER_BIZ_AI_IVR 常量 - 新增 WxMpXmlOutTransferBizAiIvrMessage 消息类 - 新增 TransferBizAiIvrBuilder 构建器类 - 在 WxMpXmlOutMessage 中添加 TRANSFER_BIZ_AI_IVR() 工厂方法 - 在 XStreamTransformer 中注册新消息类型 - 新增单元测试 WxMpXmlOutTransferBizAiIvrMessageTest Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add AI reply for passive user messages
feat(mp): 新增被动回复消息「转接AI回复」支持 (transfer_biz_ai_ivr)
Feb 25, 2026
There was a problem hiding this comment.
Pull request overview
本 PR 为 weixin-java-mp 公众号被动回复消息体系补齐微信官方新增的 transfer_biz_ai_ivr(转接平台 AI 回复)能力,使 SDK 可按官方要求输出对应 XML,从而触发公众平台 AI 回复功能。
Changes:
- 在
WxConsts.XmlMsgType中新增TRANSFER_BIZ_AI_IVR = "transfer_biz_ai_ivr"常量,统一复用消息类型字符串。 - 新增被动回复消息实体
WxMpXmlOutTransferBizAiIvrMessage及其 Builder(TransferBizAiIvrBuilder),并在WxMpXmlOutMessage提供工厂方法以支持链式构建。 - 在
XStreamTransformer注册新消息类型,并补充对应 XML 序列化单测。
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| weixin-java-mp/src/test/java/me/chanjar/weixin/mp/bean/message/WxMpXmlOutTransferBizAiIvrMessageTest.java | 新增 transfer_biz_ai_ivr 被动回复 XML 输出与 Builder 构建的测试用例。 |
| weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/xml/XStreamTransformer.java | 注册新 WxMpXmlOutTransferBizAiIvrMessage 以支持 XStream 序列化输出 XML。 |
| weixin-java-mp/src/main/java/me/chanjar/weixin/mp/builder/outxml/TransferBizAiIvrBuilder.java | 新增转接 AI 回复消息的 Builder,复用通用字段设置逻辑。 |
| weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/message/WxMpXmlOutTransferBizAiIvrMessage.java | 新增被动回复“转接AI回复”消息类,构造时自动设置 msgType。 |
| weixin-java-mp/src/main/java/me/chanjar/weixin/mp/bean/message/WxMpXmlOutMessage.java | 新增 TRANSFER_BIZ_AI_IVR() 工厂方法以支持链式构建。 |
| weixin-java-common/src/main/java/me/chanjar/weixin/common/api/WxConsts.java | 在 XmlMsgType 中新增 TRANSFER_BIZ_AI_IVR 常量。 |
🤖 Augment PR SummarySummary: 补齐公众号被动回复消息类型
🤖 Was this summary useful? React with 👍 or 👎 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
微信公众号被动回复消息缺少
transfer_biz_ai_ivr类型支持,无法触发平台 AI 回复功能。变更内容
WxConsts.XmlMsgType.TRANSFER_BIZ_AI_IVR = "transfer_biz_ai_ivr"WxMpXmlOutTransferBizAiIvrMessage,继承WxMpXmlOutMessage,构造时自动设置msgTypeTransferBizAiIvrBuilder,遵循现有 Builder 模式XStreamTransformer中注册新消息类型WxMpXmlOutMessage.TRANSFER_BIZ_AI_IVR()支持链式调用使用示例
生成的 XML:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.