5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-09 23:40:27 +00:00

Update to latest go-gitter API changes

This commit is contained in:
Wim 2016-11-02 16:28:23 +01:00
parent 1b15897135
commit 581847f415

View File

@ -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)