Class Jabber::Roster::XRoster
In: lib/xmpp4r/roster/x/roster.rb
Parent: X

Implementation of JEP-0144 for <x xmlns=‘jabber.org/protocol/rosterx’/> attached to <message/> stanzas

Should be backwards compatible to JEP-0093, as only action attribute of roster items are missing there. Pay attention to the namespace which is jabber:x:roster for JEP-0093!

Methods

new   typed_add  

Public Class methods

Initialize a new XRoster element

[Source]

    # File lib/xmpp4r/roster/x/roster.rb, line 22
22:       def initialize
23:         super()
24:         add_namespace('http://jabber.org/protocol/rosterx')
25:       end

Public Instance methods

Add an element to the roster attachment

Converts <item/> elements to XRosterItem

[Source]

    # File lib/xmpp4r/roster/x/roster.rb, line 31
31:       def typed_add(element)
32:         if element.kind_of?(REXML::Element) && (element.name == 'item')
33:           super(XRosterItem::new.import(element))
34:         else
35:           super(element)
36:         end
37:       end

[Validate]