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:
commit
0bcd16b252
@ -831,9 +831,9 @@ func (bot *CQBot) CQHandleQuickOperation(context, operation gjson.Result) MSG {
|
|||||||
if reply.Exists() {
|
if reply.Exists() {
|
||||||
autoEscape := global.EnsureBool(operation.Get("auto_escape"), false)
|
autoEscape := global.EnsureBool(operation.Get("auto_escape"), false)
|
||||||
|
|
||||||
at := !isAnonymous // 除匿名消息场合外默认 true
|
at := !isAnonymous && msgType == "group" // 除匿名消息场合外默认 true
|
||||||
if operation.Get("at_sender").Exists() {
|
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() {
|
if at && reply.IsArray() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user