Skip to content

Commit

Permalink
fix: private reply id error, fix #1608
Browse files Browse the repository at this point in the history
  • Loading branch information
Akegarasu committed Sep 9, 2022
1 parent bae00b5 commit bc9c6c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions coolq/cqcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit bc9c6c4

Please sign in to comment.