Skip to content

Commit

Permalink
fix #1556
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrs4s committed Jun 25, 2022
1 parent 2402bbe commit f772996
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions coolq/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -873,17 +873,17 @@ func (bot *CQBot) uploadForwardElement(m gjson.Result, target int64, sourceType
}
if e.Get("data.id").Exists() {
i := e.Get("data.id").Int()
m, _ := db.GetGroupMessageByGlobalID(int32(i))
m, _ := db.GetMessageByGlobalID(int32(i))
if m != nil {
msgTime := m.Attribute.Timestamp
msgTime := m.GetAttribute().Timestamp
if msgTime == 0 {
msgTime = ts.Unix()
}
return &message.ForwardNode{
SenderId: m.Attribute.SenderUin,
SenderName: m.Attribute.SenderName,
SenderId: m.GetAttribute().SenderUin,
SenderName: m.GetAttribute().SenderName,
Time: int32(msgTime),
Message: resolveElement(bot.ConvertContentMessage(m.Content, message.SourceGroup)),
Message: resolveElement(bot.ConvertContentMessage(m.GetContent(), message.SourceGroup)),
}
}
log.Warnf("警告: 引用消息 %v 错误或数据库未开启.", e.Get("data.id").Str)
Expand Down

0 comments on commit f772996

Please sign in to comment.