Sha256: b5b768da77bd27fd3b847d423dd4d2f13283db476e90a7906119c5a8625b87e3

Contents?: true

Size: 560 Bytes

Versions: 1

Compression:

Stored size: 560 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

    def inherit(node)
      muc.remove
      super
      self
    end

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

end # Presence
end # Stanza
end # Blather

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blather-0.6.2 lib/blather/stanza/presence/muc.rb