From bc9c6c49f191a99c0a08b45d524ee7cce33cd906 Mon Sep 17 00:00:00 2001 From: Akiba Date: Fri, 9 Sep 2022 22:44:43 +0800 Subject: [PATCH] fix: private reply id error, fix #1608 --- coolq/cqcode.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 1f1475b..571b9b1 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -84,14 +84,14 @@ func (e *PokeElement) Type() message.ElementType { func replyID(r *message.ReplyElement, source message.Source) int32 { id := source.PrimaryID seq := r.ReplySeq - if source.SourceType == message.SourcePrivate { + if r.GroupID != 0 { + id = r.GroupID + } + if source.SourceType == message.SourcePrivate && r.Sender == source.PrimaryID { // 私聊似乎腾讯服务器有bug? seq = int32(uint16(seq)) id = r.Sender } - if r.GroupID != 0 { - id = r.GroupID - } return db.ToGlobalID(id, seq) }