5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 19:01:35 +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 { func (b *Bgitter) JoinChannel(channel string) error {
_, err := b.c.JoinRoom(channel)
if err != nil {
return err
}
room := channel room := channel
roomID := b.getRoomID(room) roomID := b.getRoomID(room)
if roomID == "" { if roomID == "" {
return nil 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) stream := b.c.Stream(roomID)
go b.c.Listen(stream) go b.c.Listen(stream)