summaryrefslogtreecommitdiffstats
path: root/bridge/gitter/gitter.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-02 16:28:23 +0100
committerWim <wim@42.be>2016-11-02 16:28:23 +0100
commit581847f415ac83a2874c7ed9edc157673a4942eb (patch)
tree463fcd0d901a482b84e530ce8f7ef28bc90ff564 /bridge/gitter/gitter.go
parent1b1589713592ec9d8f1945e4e61cac423e3e245e (diff)
downloadmatterbridge-msglm-581847f415ac83a2874c7ed9edc157673a4942eb.tar.gz
matterbridge-msglm-581847f415ac83a2874c7ed9edc157673a4942eb.tar.bz2
matterbridge-msglm-581847f415ac83a2874c7ed9edc157673a4942eb.zip
Update to latest go-gitter API changes
Diffstat (limited to 'bridge/gitter/gitter.go')
-rw-r--r--bridge/gitter/gitter.go12
1 files changed, 8 insertions, 4 deletions
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)