- 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:
rcorniere
2020-01-31 11:48:03 +01:00
parent 84665d8c13
commit 8798ff6fc1
54 changed files with 724 additions and 229 deletions

View File

@@ -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{})
}