Skip to content

Commit

Permalink
fix: #1608 again
Browse files Browse the repository at this point in the history
  • Loading branch information
Akegarasu committed Sep 16, 2022
1 parent bc9c6c4 commit 069a764
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coolq/cqcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ func replyID(r *message.ReplyElement, source message.Source) int32 {
if r.GroupID != 0 {
id = r.GroupID
}
if source.SourceType == message.SourcePrivate && r.Sender == source.PrimaryID {
// 私聊时,部分(不确定)的账号会在 ReplyElement 中带有 GroupID 字段。
// 这里需要判断是由于 “直接回复” 功能,GroupID 为触发直接回复的来源那个群。
if source.SourceType == message.SourcePrivate && (r.Sender == source.PrimaryID || r.GroupID == source.PrimaryID) {
// 私聊似乎腾讯服务器有bug?
seq = int32(uint16(seq))
id = r.Sender
Expand Down

0 comments on commit 069a764

Please sign in to comment.