mirror of
https://github.com/pinpox/gitea-matrix-bot
synced 2024-11-26 08:43:47 +01:00
allow for other matrix hosts
This commit is contained in:
parent
f716061456
commit
98f0043bfa
@ -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")
|
||||
|
||||
|
3
main.go
3
main.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user