Skip to content

Commit 069a764

Browse files
committed
fix: #1608 again
1 parent bc9c6c4 commit 069a764

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coolq/cqcode.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ func replyID(r *message.ReplyElement, source message.Source) int32 {
8787
if r.GroupID != 0 {
8888
id = r.GroupID
8989
}
90-
if source.SourceType == message.SourcePrivate && r.Sender == source.PrimaryID {
90+
// 私聊时,部分(不确定)的账号会在 ReplyElement 中带有 GroupID 字段。
91+
// 这里需要判断是由于 “直接回复” 功能,GroupID 为触发直接回复的来源那个群。
92+
if source.SourceType == message.SourcePrivate && (r.Sender == source.PrimaryID || r.GroupID == source.PrimaryID) {
9193
// 私聊似乎腾讯服务器有bug?
9294
seq = int32(uint16(seq))
9395
id = r.Sender

0 commit comments

Comments
 (0)