1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-10 15:52:26 +08:00

feat: 优化MixMessage采用指针传参,减少2次拷贝 (#394)

This commit is contained in:
ForrestSu
2021-04-18 18:55:32 +08:00
committed by GitHub
parent fb1aa60ae8
commit 34f1335d17
3 changed files with 9 additions and 9 deletions

View File

@@ -35,7 +35,7 @@ officialAccount := wc.GetOfficialAccount(cfg)
// 传入request和responseWriter
server := officialAccount.GetServer(req, rw)
//设置接收消息的处理方法
server.SetMessageHandler(func(msg message.MixMessage) *message.Reply {
server.SetMessageHandler(func(msg *message.MixMessage) *message.Reply {
//回复消息:演示回复用户发送的消息
text := message.NewText(msg.Content)