Skip to content

Commit

Permalink
coolq: fix private reply id
Browse files Browse the repository at this point in the history
Fixes #1368
  • Loading branch information
wdvxdr1123 committed Feb 11, 2022
1 parent 115a5f1 commit cf9fa71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions coolq/cqcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func ToArrayMessage(e []message.IMessageElement, source MessageSource) (r []glob
if reply != nil && source.SourceType&(MessageSourceGroup|MessageSourcePrivate) != 0 {
replyElem := reply.(*message.ReplyElement)
rid := int64(source.PrimaryID)
if rid == 0 {
if source.SourceType == MessageSourcePrivate {
rid = replyElem.Sender
}
if replyElem.GroupID != 0 {
Expand Down Expand Up @@ -280,7 +280,7 @@ func ToStringMessage(e []message.IMessageElement, source MessageSource, isRaw ..
if reply != nil && source.SourceType&(MessageSourceGroup|MessageSourcePrivate) != 0 {
replyElem := reply.(*message.ReplyElement)
rid := int64(source.PrimaryID)
if rid == 0 {
if source.SourceType == MessageSourcePrivate {
rid = replyElem.Sender
}
if replyElem.GroupID != 0 {
Expand Down

0 comments on commit cf9fa71

Please sign in to comment.