aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-02-21 15:12:22 +0100
committerAlex Auvolat <alex@adnab.me>2020-02-21 15:12:22 +0100
commit92d380aa86dfd3e60f5b8d826ec96c0fbc17614a (patch)
treec5edf0e60ee308ba49a0aa526fa5ad184f289f2f /main.go
parenta4cf41536fc8eef743cd330b86e784079100ec6c (diff)
downloadeasybridge-92d380aa86dfd3e60f5b8d826ec96c0fbc17614a.tar.gz
easybridge-92d380aa86dfd3e60f5b8d826ec96c0fbc17614a.zip
Easybridge has an avatar
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index 50f8bc7..60272a7 100644
--- a/main.go
+++ b/main.go
@@ -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)
}