1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00

coolq: fix private reply id

Fixes #1368
This commit is contained in:
wdvxdr 2022-02-11 14:17:54 +08:00
parent 115a5f1da7
commit cf9fa71646
No known key found for this signature in database
GPG Key ID: 703F8C071DE7A1B6

View File

@ -114,7 +114,7 @@ func ToArrayMessage(e []message.IMessageElement, source MessageSource) (r []glob
if reply != nil && source.SourceType&(MessageSourceGroup|MessageSourcePrivate) != 0 { if reply != nil && source.SourceType&(MessageSourceGroup|MessageSourcePrivate) != 0 {
replyElem := reply.(*message.ReplyElement) replyElem := reply.(*message.ReplyElement)
rid := int64(source.PrimaryID) rid := int64(source.PrimaryID)
if rid == 0 { if source.SourceType == MessageSourcePrivate {
rid = replyElem.Sender rid = replyElem.Sender
} }
if replyElem.GroupID != 0 { if replyElem.GroupID != 0 {
@ -280,7 +280,7 @@ func ToStringMessage(e []message.IMessageElement, source MessageSource, isRaw ..
if reply != nil && source.SourceType&(MessageSourceGroup|MessageSourcePrivate) != 0 { if reply != nil && source.SourceType&(MessageSourceGroup|MessageSourcePrivate) != 0 {
replyElem := reply.(*message.ReplyElement) replyElem := reply.(*message.ReplyElement)
rid := int64(source.PrimaryID) rid := int64(source.PrimaryID)
if rid == 0 { if source.SourceType == MessageSourcePrivate {
rid = replyElem.Sender rid = replyElem.Sender
} }
if replyElem.GroupID != 0 { if replyElem.GroupID != 0 {