1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 11:33:48 +08:00

Merge pull request #775 from Yiwen-Chan/dev

fix: quick operation at_sender
This commit is contained in:
Mrs4s 2021-03-31 18:10:41 +08:00 committed by GitHub
commit e93a0fdd84
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() {
autoEscape := global.EnsureBool(operation.Get("auto_escape"), false)
at := !isAnonymous && msgType == "group" // 除匿名消息场合外默认 true
if operation.Get("at_sender").Exists() {
at = operation.Get("at_sender").Bool() && !isAnonymous && msgType == "group"
}
at := operation.Get("at_sender").Bool() && !isAnonymous && msgType == "group"
if at && reply.IsArray() {
// 在 reply 数组头部插入CQ码
replySegments := make([]MSG, 0)