forked from Mirrors/gomuks
Delegate headless homeserver to configuration
This commit is contained in:
parent
a55f78d628
commit
f6f1a906d0
1 changed files with 3 additions and 8 deletions
|
@ -18,7 +18,7 @@ import (
|
|||
)
|
||||
|
||||
type Config struct {
|
||||
OutputDir, MxPassword, KeyPath, KeyPassword, RecoveryPhrase string
|
||||
OutputDir, MxPassword, Homeserver, KeyPath, KeyPassword, RecoveryPhrase string
|
||||
MxID id.UserID
|
||||
}
|
||||
|
||||
|
@ -43,12 +43,7 @@ func Init(conf Config, updates chan fmt.Stringer) error {
|
|||
updates <- initializedGomuks{}
|
||||
|
||||
// login section
|
||||
_, hs, err := conf.MxID.Parse()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
gmx.Config().HS = hs
|
||||
gmx.Config().HS = conf.Homeserver
|
||||
if err := gmx.Matrix().InitClient(false); err != nil {
|
||||
return err
|
||||
} else if err = gmx.Matrix().Login(conf.MxID.String(), conf.MxPassword); err != nil {
|
||||
|
|
Loading…
Add table
Reference in a new issue