1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 12:03:50 +08:00

fix: quick operation at_sender

This commit is contained in:
Kanri 2021-03-31 11:59:49 +08:00 committed by GitHub
parent d7ee32ebe6
commit f495001fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -860,12 +860,7 @@ 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 := operation.Get("at_sender").Bool() && !isAnonymous && msgType == "group"
at := !isAnonymous && msgType == "group" // 除匿名消息场合外默认 true
if operation.Get("at_sender").Exists() {
at = operation.Get("at_sender").Bool() && !isAnonymous && msgType == "group"
}
if at && reply.IsArray() { if at && reply.IsArray() {
// 在 reply 数组头部插入CQ码 // 在 reply 数组头部插入CQ码
replySegments := make([]MSG, 0) replySegments := make([]MSG, 0)