diff --git a/mq/handler.go b/mq/handler.go index b24a61b..223014b 100644 --- a/mq/handler.go +++ b/mq/handler.go @@ -23,7 +23,7 @@ func parse(msg []byte) { m.Raw = string(msg) // 如果不是自己的消息,直接返回 - if m.FromUser == current.GetRobotInfo().WxId { + if m.ToUser == current.GetRobotInfo().WxId { return } diff --git a/tcpserver/parse.go b/tcpserver/parse.go index ceaacff..6f3b35d 100644 --- a/tcpserver/parse.go +++ b/tcpserver/parse.go @@ -24,7 +24,7 @@ func parse(remoteAddr net.Addr, msg []byte) { m.Raw = string(msg) // 如果不是自己的消息,直接返回 - if m.FromUser == current.GetRobotInfo().WxId { + if m.ToUser == current.GetRobotInfo().WxId { return }