1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-06-30 20:03:24 +00:00

Merge pull request #702 from sam01101/dev

限制 handle_quick_op... 的 at_sender 使用场景
This commit is contained in:
Mrs4s
2021-03-08 08:35:17 +08:00
committed by GitHub

View File

@ -831,9 +831,9 @@ func (bot *CQBot) CQHandleQuickOperation(context, operation gjson.Result) MSG {
if reply.Exists() {
autoEscape := global.EnsureBool(operation.Get("auto_escape"), false)
at := !isAnonymous // 除匿名消息场合外默认 true
at := !isAnonymous && msgType == "group" // 除匿名消息场合外默认 true
if operation.Get("at_sender").Exists() {
at = operation.Get("at_sender").Bool() && !isAnonymous
at = operation.Get("at_sender").Bool() && !isAnonymous && msgType == "group"
}
if at && reply.IsArray() {