mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 19:43:49 +08:00
fix #1556
This commit is contained in:
parent
2402bbedb0
commit
f772996418
10
coolq/api.go
10
coolq/api.go
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user