From b6562aef8c822c125bd4a5640312c2abb25801e3 Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Sat, 2 Oct 2021 10:52:21 +0800 Subject: [PATCH] update --- develop/qinglong/cron.go | 3 +++ develop/qinglong/init.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/develop/qinglong/cron.go b/develop/qinglong/cron.go index d54ef51..d7d41fa 100644 --- a/develop/qinglong/cron.go +++ b/develop/qinglong/cron.go @@ -199,6 +199,9 @@ func init() { Admin: true, Cron: "*/5 * * * *", Handle: func(s core.Sender) interface{} { + if Config.Host == "" { + return nil + } if s.GetImType() == "fake" && qinglong.GetBool("autoCronHideDuplicate", true) == false { return nil } diff --git a/develop/qinglong/init.go b/develop/qinglong/init.go index 7680e98..b455bc1 100644 --- a/develop/qinglong/init.go +++ b/develop/qinglong/init.go @@ -79,6 +79,9 @@ func (ql *QingLong) GetToken() (string, error) { } func (ql *QingLong) Req(ps ...interface{}) error { + if ql.Host == "" { + return nil + } token, err := ql.GetToken() if err != nil { return err