Merge pull request #19 from EvanDbg/main

add onGroups for wx
This commit is contained in:
cdle
2021-10-22 06:53:08 +08:00
committed by GitHub
+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)