mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-11-20 08:33:44 -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:
@@ -11,12 +11,18 @@ type Version struct {
|
||||
Name string `xml:"name,omitempty"`
|
||||
Version string `xml:"version,omitempty"`
|
||||
OS string `xml:"os,omitempty"`
|
||||
// Result sets
|
||||
ResultSet *ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
func (v *Version) Namespace() string {
|
||||
return v.XMLName.Space
|
||||
}
|
||||
|
||||
func (v *Version) GetSet() *ResultSet {
|
||||
return v.ResultSet
|
||||
}
|
||||
|
||||
// ---------------
|
||||
// Builder helpers
|
||||
|
||||
@@ -41,5 +47,5 @@ func (v *Version) SetInfo(name, version, os string) *Version {
|
||||
// Registry init
|
||||
|
||||
func init() {
|
||||
TypeRegistry.MapExtension(PKTIQ, xml.Name{"jabber:iq:version", "query"}, Version{})
|
||||
TypeRegistry.MapExtension(PKTIQ, xml.Name{Space: "jabber:iq:version", Local: "query"}, Version{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user