1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00
This commit is contained in:
Mrs4s 2021-06-17 15:11:29 +08:00
parent fad3bf1314
commit f40ff22c0e
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -420,7 +420,7 @@ func (bot *CQBot) CQSendGroupForwardMessage(groupID int64, m gjson.Result) MSG {
ts := time.Now().Add(-time.Minute * 5)
hasCustom := func() bool {
for _, item := range m.Array() {
if item.Get("data.uin").Exists() {
if item.Get("data.uin").Exists() || item.Get("data.user_id").Exists() {
return true
}
}
@ -455,6 +455,9 @@ func (bot *CQBot) CQSendGroupForwardMessage(groupID int64, m gjson.Result) MSG {
return
}
uin, _ := strconv.ParseInt(e.Get("data.uin").Str, 10, 64)
if uin == 0 {
uin, _ = strconv.ParseInt(e.Get("data.user_id").Str, 10, 64)
}
msgTime, err := strconv.ParseInt(e.Get("data.time").Str, 10, 64)
if err != nil {
msgTime = ts.Unix()