Fixed using port from config.

This commit is contained in:
Benjamin A. Shelton 2026-10-02 15:46:04 -06:00
commit 60dfec9b65
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01
2 changed files with 3 additions and 2 deletions

View file

@ -2,6 +2,7 @@ package main
import ( import (
"context" "context"
"net"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
@ -120,7 +121,7 @@ func NewBot() (bot *Bot, errch chan error, err error) {
} }
bot.AttachHandlers()*/ bot.AttachHandlers()*/
go func() { go func() {
_ = http.ListenAndServe(":3117", &interceptor{mux}) _ = http.ListenAndServe(net.JoinHostPort(conf.Service.Webhook.Host, conf.Service.Webhook.Port), &interceptor{mux})
}() }()
bot.Handler, err = th.NewBotHandler(b, updates) bot.Handler, err = th.NewBotHandler(b, updates)

View file

@ -43,7 +43,7 @@ type Service struct {
type Webhook struct { type Webhook struct {
URI string `toml:"uri"` URI string `toml:"uri"`
Port int `toml:"port"` Port string `toml:"port"`
Host string `toml:"host"` Host string `toml:"host"`
} }