diff --git a/mm-go-irckit/mmuser.go b/mm-go-irckit/mmuser.go index 51ebd0b3..1289b3af 100644 --- a/mm-go-irckit/mmuser.go +++ b/mm-go-irckit/mmuser.go @@ -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)