Skip to content

Commit

Permalink
Revert #2207 (#2397)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangxiangxiong9 committed Aug 23, 2023
1 parent 5db03c7 commit 977030e
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions coolq/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1689,26 +1689,8 @@ func (bot *CQBot) CQGetMessage(messageID int32) global.MSG {
switch o := msg.(type) {
case *db.StoredGroupMessage:
m["group_id"] = o.GroupCode
if o.QuotedInfo != nil {
elem := global.MSG{
"type": "reply",
"data": global.MSG{
"id": strconv.FormatInt(int64(o.QuotedInfo.PrevGlobalID), 10),
},
}
o.Content = append(o.Content, elem)
}
m["message"] = ToFormattedMessage(bot.ConvertContentMessage(o.Content, message.SourceGroup, false), message.Source{SourceType: message.SourceGroup, PrimaryID: o.GroupCode})
case *db.StoredPrivateMessage:
if o.QuotedInfo != nil {
elem := global.MSG{
"type": "reply",
"data": global.MSG{
"id": strconv.FormatInt(int64(o.QuotedInfo.PrevGlobalID), 10),
},
}
o.Content = append(o.Content, elem)
}
m["message"] = ToFormattedMessage(bot.ConvertContentMessage(o.Content, message.SourcePrivate, false), message.Source{SourceType: message.SourcePrivate})
}
return OK(m)
Expand Down

0 comments on commit 977030e

Please sign in to comment.