def update_status_without_notifying_peers(connection_id, input_status, &block)
      if !input_status
        block.call
        return false
      end

      status = {}

      if input_status['name']
        if !input_status['name'] || input_status['name'] =~ /\A\s*\z/
          return_error connection_id, 'blank name not allowed'
        end

        if input_status['name'].size > 50
          return_error connection_id, 'name too long'
        end

        begin
          valid_encoding = input_status['name'] =~ /\A\p{ASCII}+\z/
        rescue Encoding::CompatibilityError
          valid_encoding = false
        end

        if !valid_encoding
          input_status['name'] = '*' * input_status['name'].size
        end

        status['name'] = input_status['name']
      end

      if input_status['user_agent']
        unless %w[firefox chrome unknown].include? input_status['user_agent']
          return_error connection_id, 'unknown user agent'
        end

        status['user_agent'] = input_status['user_agent']
      end

      unless status.empty?
        @redis.hmset "store:connection:status:#{connection_id}", *status.to_a.flatten, &block
        true
      end
    end
def update_status_without_notifying_peers(connection_id, input_status, &block)
      if !input_status
        block.call
        return false
      end

      status = {}

      if input_status['name']
        if !input_status['name'] || input_status['name'] =~ /\A\s*\z/
          return_error connection_id, 'blank name not allowed'
        end

        if input_status['name'].size > 50
          return_error connection_id, 'name too long'
        end

        begin
          valid_encoding = input_status['name'] =~ /\A\p{ASCII}+\z/
        rescue Encoding::CompatibilityError
          valid_encoding = false
        end

        if !valid_encoding
          input_status['name'] = '*' * input_status['name'].size
        end

        status['name'] = input_status['name']
      end

      if input_status['user_agent']
        unless %w[firefox chrome unknown].include? input_status['user_agent']
          return_error connection_id, 'unknown user agent'
        end

        status['user_agent'] = input_status['user_agent']
      end

      unless status.empty?
        @redis.hmset "store:connection:status:#{connection_id}", *status.to_a.flatten, &block
        true
      end
    end
TODO shorten