Skip to content

Commit 8754d22

Browse files
committed
enhancd(official): notify with autoreply
1 parent a7aaeab commit 8754d22

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/zh/official-account/server.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ import (
102102

103103
// 这里回复success告诉微信我收到了,后续需要回复用户信息可以主动调发消息接口
104104
return kernel.SUCCESS_EMPTY_RESPONSE
105+
106+
// 如果要返回xml,也可以返回message对象
107+
return messages.NewText("返回消息内容")
108+
105109
})
106110

107111
if err != nil {
@@ -133,4 +137,4 @@ import (
133137

134138
参考:[PowerWechatTutorial](https://github.com/ArtisanCloud/PowerWechatTutorial/blob/master/controllers/official-account/server.go)
135139

136-
微信官方文档: [https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html](https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html)
140+
微信官方文档: [https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html](https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html)

0 commit comments

Comments
 (0)