5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-25 07:15:43 +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
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 {