Skip to content

Commit

Permalink
Add/remove ourselves to the channel if we join using the GUI. #239
Browse files Browse the repository at this point in the history
  • Loading branch information
42wim committed Apr 3, 2019
1 parent c1c5fd9 commit df0c467
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mm-go-irckit/mmuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,12 @@ func (u *User) handleWsActionUserAdded(rmsg *model.WebSocketEvent) {
return
}

// do not add ourselves to the channel
// add ourselves to the channel
if userId == u.mc.User.Id {
logger.Debugf("ACTION_USER_ADDED not adding myself to %s (%s)", u.mc.GetChannelName(rmsg.Broadcast.ChannelId), rmsg.Broadcast.ChannelId)
logger.Debugf("ACTION_USER_ADDED adding myself to %s (%s)", u.mc.GetChannelName(rmsg.Broadcast.ChannelId), rmsg.Broadcast.ChannelId)
u.syncMMChannel(rmsg.Broadcast.ChannelId, u.mc.GetChannelName(rmsg.Broadcast.ChannelId))
ch := u.Srv.Channel(rmsg.Broadcast.ChannelId)
ch.Join(u)
return
}
u.addUserToChannel(u.mc.GetUser(userId), "#"+u.mc.GetChannelName(rmsg.Broadcast.ChannelId), rmsg.Broadcast.ChannelId)
Expand Down

0 comments on commit df0c467

Please sign in to comment.