mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-08 11:13:42 -08:00
- Changed IQ stanzas to pointer semantics
- Fixed commands from v 0.4.0 and tests - Added primitive Result Sets support (XEP-0059)
This commit is contained in:
@@ -35,12 +35,17 @@ const (
|
||||
// Roster struct represents Roster IQs
|
||||
type Roster struct {
|
||||
XMLName xml.Name `xml:"jabber:iq:roster query"`
|
||||
// Result sets
|
||||
ResultSet *ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
// Namespace defines the namespace for the RosterIQ
|
||||
func (r *Roster) Namespace() string {
|
||||
return r.XMLName.Space
|
||||
}
|
||||
func (r *Roster) GetSet() *ResultSet {
|
||||
return r.ResultSet
|
||||
}
|
||||
|
||||
// ---------------
|
||||
// Builder helpers
|
||||
@@ -64,6 +69,8 @@ func (iq *IQ) RosterIQ() *Roster {
|
||||
type RosterItems struct {
|
||||
XMLName xml.Name `xml:"jabber:iq:roster query"`
|
||||
Items []RosterItem `xml:"item"`
|
||||
// Result sets
|
||||
ResultSet *ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
// Namespace lets RosterItems implement the IQPayload interface
|
||||
@@ -71,6 +78,10 @@ func (r *RosterItems) Namespace() string {
|
||||
return r.XMLName.Space
|
||||
}
|
||||
|
||||
func (r *RosterItems) GetSet() *ResultSet {
|
||||
return r.ResultSet
|
||||
}
|
||||
|
||||
// RosterItem represents an item in the roster iq
|
||||
type RosterItem struct {
|
||||
XMLName xml.Name `xml:"jabber:iq:roster item"`
|
||||
|
||||
Reference in New Issue
Block a user