From 8af9ed9fe4d188f041fb44c554efcfa1148c5f5b Mon Sep 17 00:00:00 2001 From: cdle <798731886@qq.com> Date: Fri, 29 Oct 2021 19:01:44 +0800 Subject: [PATCH] update --- im/wx/init.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/im/wx/init.go b/im/wx/init.go index c631fa0..1d7a36f 100644 --- a/im/wx/init.go +++ b/im/wx/init.go @@ -154,6 +154,10 @@ func init() { robot_wxid = jms.RobotWxid wx.Set("robot_wxid", robot_wxid) } + if wx.Get("api_url") == "" { + ip, _ := c.RemoteIP() + wx.Set("api_url", fmt.Sprintf("http://%s:80", ip.String())) // + } core.Senders <- &Sender{ value: jms, }