1
0
mirror of https://github.com/silenceper/wechat.git synced 2026-02-08 22:52:27 +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

@@ -22,7 +22,7 @@ openPlatform := wc.GetOpenPlatform(cfg)
// 传入request和responseWriter
server := openPlatform.GetServer(req, rw)
//设置接收消息的处理方法
server.SetMessageHandler(func(msg message.MixMessage) *message.Reply {
server.SetMessageHandler(func(msg *message.MixMessage) *message.Reply {
if msg.InfoType == message.InfoTypeVerifyTicket {
componentVerifyTicket, err := openPlatform.SetComponentAccessToken(msg.ComponentVerifyTicket)
if err != nil {