From 506e3ee08a0eb089a1e5fa7c3d013c1674d4065c Mon Sep 17 00:00:00 2001 From: madrinx Date: Wed, 16 Oct 2024 20:52:13 +0330 Subject: [PATCH] fix(tgbot): missed variable name change --- web/service/tgbot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 257fcc94..7a567d63 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -153,12 +153,12 @@ func (t *Tgbot) NewBot(token string, proxyUrl string, apiServerUrl string) (*tel Dial: fasthttpproxy.FasthttpSocksDialer(proxyUrl), })) } else { - if !strings.HasPrefix(proxyUrl, "http") { + if !strings.HasPrefix(apiServerUrl, "http") { logger.Warning("Invalid http(s) URL, starting with default") return telego.NewBot(token) } - _, err := url.Parse(proxyUrl) + _, err := url.Parse(apiServerUrl) if err != nil { logger.Warning("Can't parse API server URL, using default instance for tgbot:", err) return telego.NewBot(token)