From a17a0fea83c5174dfa272c662e9b07bd137395a9 Mon Sep 17 00:00:00 2001 From: Timur Ismagilov Date: Fri, 24 Jun 2022 18:15:27 +0500 Subject: [PATCH] Fix #153 Wrong URL shown in the feeds --- cfg/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cfg/config.go b/cfg/config.go index 4267068..af1f071 100644 --- a/cfg/config.go +++ b/cfg/config.go @@ -193,8 +193,10 @@ func ReadConfigFile(path string) error { TelegramEnabled = (TelegramBotToken != "") && (TelegramBotName != "") // This URL makes much more sense. If no URL is set or the protocol is forgotten, assume HTTP. - if (URL == "") || !strings.Contains(URL, ":") { + if URL == "" { URL = "http://" + ListenAddr + } else if !strings.Contains(URL, ":") { + URL = "http://" + URL } return nil