5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 12:50:27 +00:00

Check if room exists when joining channel (gitter). Closes #135

This commit is contained in:
Wim 2017-03-16 23:01:09 +01:00
parent 263b8da37d
commit 9407aa4600

View File

@ -1,6 +1,7 @@
package bgitter package bgitter
import ( import (
"fmt"
"github.com/42wim/matterbridge/bridge/config" "github.com/42wim/matterbridge/bridge/config"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/sromku/go-gitter" "github.com/sromku/go-gitter"
@ -54,7 +55,7 @@ func (b *Bgitter) JoinChannel(channel string) error {
room := channel room := channel
roomID := b.getRoomID(room) roomID := b.getRoomID(room)
if roomID == "" { if roomID == "" {
return nil return fmt.Errorf("Could not find roomID for %v. Please create the room on gitter.im", channel)
} }
user, err := b.c.GetUser() user, err := b.c.GetUser()
if err != nil { if err != nil {