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