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

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

No files matched your search

+1 -1
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 {