From 79713cf0ef2d8a318839114b2be4156555eb089a Mon Sep 17 00:00:00 2001 From: Gary Kramlich Date: Sat, 20 Nov 2021 03:33:06 -0600 Subject: [PATCH] Fix some defaults in the appservice config --- config/appservice.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/config/appservice.go b/config/appservice.go index 1e3f939..5fdeb9c 100644 --- a/config/appservice.go +++ b/config/appservice.go @@ -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 }