add onGroups for wx

This commit is contained in:
EvanDbg
2021-10-21 22:21:19 +08:00
committed by GitHub
parent cecf7c3b6f
commit ad4001e20f
+4
View File
@@ -145,6 +145,10 @@ func init() {
if jms.FinalFromWxid == jms.RobotWxid {
return
}
listen := wx.Get("onGroups")
if jms.Event == "EventGroupMsg" && listen != "" && !strings.Contains(listen, strings.Replace(fmt.Sprint(jms.FromWxid), "@chatroom", "", -1)) {
return
}
if robot_wxid != jms.RobotWxid {
robot_wxid = jms.RobotWxid
wx.Set("robot_wxid", robot_wxid)