summaryrefslogtreecommitdiffstats
path: root/bridge/gitter
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/gitter')
-rw-r--r--bridge/gitter/gitter.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/bridge/gitter/gitter.go b/bridge/gitter/gitter.go
index faa7875c..8d3a0459 100644
--- a/bridge/gitter/gitter.go
+++ b/bridge/gitter/gitter.go
@@ -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)