Class Jabber::XRoster
In: lib/xmpp4r/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/x/roster.rb, line 21
21:     def initialize
22:       super()
23:       add_namespace('http://jabber.org/protocol/rosterx')
24:     end

Public Instance methods

Add an element to the roster attachment

Converts <item/> elements to XRosterItem

[Source]

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

[Validate]