lib/turntabler/room.rb
def build_user(attrs)
      user = User.new(client, attrs)
      user = if client.user == user
        client.user
      elsif @creator == user
        creator
      elsif result = @listeners && listener(user.id) || @moderators && moderator(user.id) || friend(user.id)
        result
      else
        user
      end
      user.attributes = attrs
      user
    end
def build_user(attrs)
      user = User.new(client, attrs)
      user = if client.user == user
        client.user
      elsif @creator == user
        creator
      elsif result = @listeners && listener(user.id) || @moderators && moderator(user.id) || friend(user.id)
        result
      else
        user
      end
      user.attributes = attrs
      user
    end
Gets the user represented by the given attributes.  This can either pull
 the user from:
 * The currently authorized user
 * The room's creator
 * The room's listeners
 * The room's moderators

 If the user isn't present in any of those, then a new User instance will
 get created.

 @api private
 @param [Hash] attrs The attributes representing the user
 @return [Turntabler::User]