mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-25 12:12:05 -08:00
Check if room exists when joining channel (gitter). Closes #135
This commit is contained in:
parent
263b8da37d
commit
9407aa4600
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user