mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-04 19:17:37 +08:00
Merge pull request #1680 from Akegarasu/fix-private-replyId
Fix private replyId
This commit is contained in:
commit
8389d9195d
@ -84,14 +84,14 @@ func (e *PokeElement) Type() message.ElementType {
|
|||||||
func replyID(r *message.ReplyElement, source message.Source) int32 {
|
func replyID(r *message.ReplyElement, source message.Source) int32 {
|
||||||
id := source.PrimaryID
|
id := source.PrimaryID
|
||||||
seq := r.ReplySeq
|
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?
|
// 私聊似乎腾讯服务器有bug?
|
||||||
seq = int32(uint16(seq))
|
seq = int32(uint16(seq))
|
||||||
id = r.Sender
|
id = r.Sender
|
||||||
}
|
}
|
||||||
if r.GroupID != 0 {
|
|
||||||
id = r.GroupID
|
|
||||||
}
|
|
||||||
return db.ToGlobalID(id, seq)
|
return db.ToGlobalID(id, seq)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user