Fixed using port from config.
This commit is contained in:
parent
a9c58cba45
commit
60dfec9b65
2 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue