From 581847f415ac83a2874c7ed9edc157673a4942eb Mon Sep 17 00:00:00 2001 From: Wim Date: Wed, 2 Nov 2016 16:28:23 +0100 Subject: Update to latest go-gitter API changes --- bridge/gitter/gitter.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bridge/gitter') diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index faa7875c..8d3a0459 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -51,15 +51,19 @@ func (b *Bgitter) FullOrigin() string { } func (b *Bgitter) JoinChannel(channel string) error { - _, err := b.c.JoinRoom(channel) - if err != nil { - return err - } room := channel roomID := b.getRoomID(room) if roomID == "" { return nil } + user, err := b.c.GetUser() + if err != nil { + return err + } + _, err = b.c.JoinRoom(roomID, user.ID) + if err != nil { + return err + } stream := b.c.Stream(roomID) go b.c.Listen(stream) -- cgit v1.2.3