From 905354f9f6a60cd4cc0fb2640e1b79c7c4a8b154 Mon Sep 17 00:00:00 2001 From: Evan Date: Thu, 15 Dec 2022 11:30:28 +0900 Subject: [PATCH] v2.4 :rocket: --- bootstrap/wechat.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/wechat.go b/bootstrap/wechat.go index 9311408..92d1409 100644 --- a/bootstrap/wechat.go +++ b/bootstrap/wechat.go @@ -6,6 +6,7 @@ import ( "github.com/wechatgpt/wechatbot/config" "github.com/wechatgpt/wechatbot/handler/wechat" "os" + "strings" ) func StartWebChat() { @@ -52,7 +53,7 @@ func StartWebChat() { func getKeyword() string { keyword := os.Getenv("wechat") - if len(keyword) == 0 { + if len(strings.Trim(keyword, " ")) == 0 { gptConfig := config.GetConfig() if gptConfig != nil { if gptConfig.ChatGpt.Wechat != nil {