diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-21 15:12:22 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-21 15:12:22 +0100 |
commit | 92d380aa86dfd3e60f5b8d826ec96c0fbc17614a (patch) | |
tree | c5edf0e60ee308ba49a0aa526fa5ad184f289f2f /main.go | |
parent | a4cf41536fc8eef743cd330b86e784079100ec6c (diff) | |
download | easybridge-92d380aa86dfd3e60f5b8d826ec96c0fbc17614a.tar.gz easybridge-92d380aa86dfd3e60f5b8d826ec96c0fbc17614a.zip |
Easybridge has an avatar
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -200,7 +200,7 @@ func main() { } conn.SetHandler(account) appservice.AddAccount(account) - go connectAndJoin(conn, params) + go connectAndJoin(account, params) } } @@ -210,15 +210,15 @@ func main() { } } -func connectAndJoin(conn connector.Connector, params ConfigAccount) { +func connectAndJoin(account *appservice.Account, params ConfigAccount) { log.Printf("Connecting to %s", params.Protocol) - err := conn.Configure(params.Config) + err := account.Conn.Configure(params.Config) if err != nil { log.Printf("Could not connect to %s: %s", params.Protocol, err) } else { log.Printf("Connected to %s, now joining %#v", params.Protocol, params.Rooms) for _, room := range params.Rooms { - err := conn.Join(connector.RoomID(room)) + err := account.Conn.Join(connector.RoomID(room)) if err != nil { log.Printf("Could not join %s: %s", room, err) } |