1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08: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
commit 0bcd16b252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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() {