From 9407aa4600668a3adec0ef9fbf7475a6b95ebdaa Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 16 Mar 2017 23:01:09 +0100 Subject: Check if room exists when joining channel (gitter). Closes #135 --- bridge/gitter/gitter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go index d1f4b401..ae9ef021 100644 --- a/bridge/gitter/gitter.go +++ b/bridge/gitter/gitter.go @@ -1,6 +1,7 @@ package bgitter import ( + "fmt" "github.com/42wim/matterbridge/bridge/config" log "github.com/Sirupsen/logrus" "github.com/sromku/go-gitter" @@ -54,7 +55,7 @@ func (b *Bgitter) JoinChannel(channel string) error { room := channel roomID := b.getRoomID(room) 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() if err != nil { -- cgit v1.2.3