1
0
mirror of https://github.com/pinpox/gitea-matrix-bot synced 2024-11-22 10:21:58 +01:00

allow for other matrix hosts

This commit is contained in:
Pablo Ovelleiro Corral 2019-04-22 20:27:53 +02:00
parent f716061456
commit 98f0043bfa
2 changed files with 3 additions and 2 deletions

@ -18,7 +18,7 @@ type GiteaBot struct {
}
//NewGiteaBot creates a new bot form user credentials
func NewGiteaBot(user, pass string, DBPath string) *GiteaBot {
func NewGiteaBot(user, pass, host, string, DBPath string) *GiteaBot {
bot, err := matrixbot.NewMatrixBot(user, pass, "gitea")

@ -47,10 +47,11 @@ func init() {
matrixUser := cfg.Section("matrix").Key("matrix_user").String()
matrixPass := cfg.Section("matrix").Key("matrix_pass").String()
matrixHost := cfg.Section("matrix").Key("matrix_pass").String()
dbPath := cfg.Section("bot").Key("db_path").String()
//Set up the bot
mygiteabot = NewGiteaBot(matrixUser, matrixPass, dbPath)
mygiteabot = NewGiteaBot(matrixUser, matrixPass, matrixHost, dbPath)
if err != nil {
log.Fatal(err)