From f40ff22c0eddb496fb038c7137fc7c31c2fe1fa3 Mon Sep 17 00:00:00 2001 From: Mrs4s Date: Thu, 17 Jun 2021 15:11:29 +0800 Subject: [PATCH] fix #923. --- coolq/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coolq/api.go b/coolq/api.go index fc1f7f6..22f3dd3 100644 --- a/coolq/api.go +++ b/coolq/api.go @@ -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()