From 6d564a02ab89d516b96769f91e9599612604ff99 Mon Sep 17 00:00:00 2001 From: YouROK <8YouROK8@mail.ru> Date: Fri, 25 Apr 2025 12:24:15 +0300 Subject: [PATCH] set def api host --- server/tgbot/config/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/tgbot/config/config.go b/server/tgbot/config/config.go index 299cb83..37d32cd 100644 --- a/server/tgbot/config/config.go +++ b/server/tgbot/config/config.go @@ -24,6 +24,7 @@ func LoadConfig() { if err != nil { Cfg.WhiteIds = []int64{} Cfg.BlackIds = []int64{} + Cfg.HostTG = "https://api.telegram.org" buf, _ = json.MarshalIndent(Cfg, "", " ") if buf != nil { os.WriteFile(fn, buf, 0666) @@ -34,4 +35,7 @@ func LoadConfig() { if err != nil { log.TLogln("Error read tg config:", err) } + if Cfg.HostTG == "" { + Cfg.HostTG = "https://api.telegram.org" + } }