Fix some defaults in the appservice config

This commit is contained in:
Gary Kramlich
2021-11-20 03:33:06 -06:00
parent 4e074afc64
commit 79713cf0ef

View File

@@ -18,6 +18,18 @@ func (a *appservice) validate() error {
a.ID = "discord"
}
if a.Address == "" {
a.Address = "http://localhost:29350"
}
if a.Hostname == "" {
a.Hostname = "0.0.0.0"
}
if a.Port == 0 {
a.Port = 29350
}
if err := a.Bot.validate(); err != nil {
return err
}