mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
fix #923.
This commit is contained in:
parent
fad3bf1314
commit
f40ff22c0e
@ -420,7 +420,7 @@ func (bot *CQBot) CQSendGroupForwardMessage(groupID int64, m gjson.Result) MSG {
|
|||||||
ts := time.Now().Add(-time.Minute * 5)
|
ts := time.Now().Add(-time.Minute * 5)
|
||||||
hasCustom := func() bool {
|
hasCustom := func() bool {
|
||||||
for _, item := range m.Array() {
|
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
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -455,6 +455,9 @@ func (bot *CQBot) CQSendGroupForwardMessage(groupID int64, m gjson.Result) MSG {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
uin, _ := strconv.ParseInt(e.Get("data.uin").Str, 10, 64)
|
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)
|
msgTime, err := strconv.ParseInt(e.Get("data.time").Str, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msgTime = ts.Unix()
|
msgTime = ts.Unix()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user