Sha256: 1dce964e949e19f15135e608f2057ff8855adb3ffd037a402287d6d7cf68f6fb

Contents?: true

Size: 495 Bytes

Versions: 4

Compression:

Stored size: 495 Bytes

Contents

# encoding: UTF-8

module Vines
  class Stanza
    class Iq
      class DiscoItems < Query
        NS = NAMESPACES[:disco_items]

        register "/iq[@id and @type='get']/ns:query", 'ns' => NS

        def process
          return if route_iq
          result = to_result.tap do |el|
            el << el.document.create_element('query') do |query|
              query.default_namespace = NS
            end
          end
          stream.write(result)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vines-0.2.1 lib/vines/stanza/iq/disco_items.rb
vines-0.2.0 lib/vines/stanza/iq/disco_items.rb
vines-0.1.1 lib/vines/stanza/iq/disco_items.rb
vines-0.1.0 lib/vines/stanza/iq/disco_items.rb