Sha256: 7e99873955a695589fea04127d8718e8599a185aa839e100ae422df697ab207a

Contents?: true

Size: 641 Bytes

Versions: 23

Compression:

Stored size: 641 Bytes

Contents

module Blather
class Stanza
class Presence

  class MUC < Status
    register :muc_join, :x, "http://jabber.org/protocol/muc"

    def self.new(*args)
      new_node = super
      new_node.muc
      new_node
    end

    module InstanceMethods
      def inherit(node)
        muc.remove
        super
        self
      end

      def muc
        unless muc = find_first('ns:x', :ns => MUC.registered_ns)
          self << (muc = XMPPNode.new('x', self.document))
          muc.namespace = self.class.registered_ns
        end
        muc
      end
    end

    include InstanceMethods
  end # MUC

end # Presence
end # Stanza
end # Blather

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
blather-2.0.0 lib/blather/stanza/presence/muc.rb
blather-1.2.0 lib/blather/stanza/presence/muc.rb
blather-1.1.4 lib/blather/stanza/presence/muc.rb
blather-1.1.3 lib/blather/stanza/presence/muc.rb
blather-1.1.2 lib/blather/stanza/presence/muc.rb
blather-1.1.1 lib/blather/stanza/presence/muc.rb
blather-1.1.0 lib/blather/stanza/presence/muc.rb
blather-1.0.0 lib/blather/stanza/presence/muc.rb
blather-0.8.8 lib/blather/stanza/presence/muc.rb
blather-0.8.7 lib/blather/stanza/presence/muc.rb
blather-0.8.6 lib/blather/stanza/presence/muc.rb
blather-0.8.5 lib/blather/stanza/presence/muc.rb
blather-0.8.4 lib/blather/stanza/presence/muc.rb
blather-0.8.3 lib/blather/stanza/presence/muc.rb
blather-0.8.2 lib/blather/stanza/presence/muc.rb
tp-blather-0.8.5 lib/blather/stanza/presence/muc.rb
tp-blather-0.8.4 lib/blather/stanza/presence/muc.rb
tp-blather-0.8.3 lib/blather/stanza/presence/muc.rb
tp-blather-0.8.2 lib/blather/stanza/presence/muc.rb
blather-0.8.1 lib/blather/stanza/presence/muc.rb