Feeds: Assume HTTP when no protocol is set
This commit is contained in:
parent
36edcf6b77
commit
93783fa504
@ -7,6 +7,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/go-ini/ini"
|
"github.com/go-ini/ini"
|
||||||
)
|
)
|
||||||
@ -186,8 +187,8 @@ func ReadConfigFile(path string) error {
|
|||||||
TelegramBotName = cfg.TelegramBotName
|
TelegramBotName = cfg.TelegramBotName
|
||||||
TelegramEnabled = (TelegramBotToken != "") && (TelegramBotName != "")
|
TelegramEnabled = (TelegramBotToken != "") && (TelegramBotName != "")
|
||||||
|
|
||||||
// This URL makes much more sense.
|
// This URL makes much more sense. If no URL is set or the protocol is forgotten, assume HTTP.
|
||||||
if URL == "" {
|
if (URL == "") || (strings.Index(URL, ":") == -1) {
|
||||||
URL = "http://" + ListenAddr
|
URL = "http://" + ListenAddr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user