1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 11:07:39 +08:00
This commit is contained in:
xiangxiangxiong9 2023-08-23 12:39:28 +08:00 committed by GitHub
parent 5db03c7092
commit 977030e814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)