We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f09f159 commit 8811df5Copy full SHA for 8811df5
1 file changed
plugin/aichat/main.go
@@ -159,6 +159,17 @@ func init() {
159
}
160
logrus.Infoln("[aichat] agent do:", reqs)
161
for _, req := range reqs {
162
+ if req.Action == "send_group_msg" {
163
+ gid, ok := req.Params["group_id"].(int64)
164
+ if !ok {
165
+ logrus.Warnln("[aichat] invalid", req.Action, req.Params)
166
+ continue
167
+ }
168
+ if ctx.Event.GroupID != gid && !zero.SuperUserPermission(ctx) {
169
+ logrus.Warnln("[aichat] refuse to send out of grp from", ctx.Event.GroupID, "to", gid)
170
171
172
173
ctx.CallAction(req.Action, req.Params)
174
process.SleepAbout1sTo2s()
175
0 commit comments