diff --git a/src/xmpp/disco.go b/src/xmpp/disco.go index 3951d8b..cf1bdcf 100644 --- a/src/xmpp/disco.go +++ b/src/xmpp/disco.go @@ -39,7 +39,7 @@ type DiscoFeature struct { // Iq get/result payload for "items" requests. type DiscoItems struct { XMLName xml.Name `xml:"http://jabber.org/protocol/disco#items query"` - Node string `xml:"node,attr"` + Node string `xml:"node,attr"` Item []DiscoItem `xml:"item"` } diff --git a/src/xmpp/softwareVersion.go b/src/xmpp/softwareVersion.go new file mode 100644 index 0000000..4e22cbf --- /dev/null +++ b/src/xmpp/softwareVersion.go @@ -0,0 +1,17 @@ +package xmpp + +import ( + "encoding/xml" +) + +const ( + NsJabberClient = "jabber:iq:version" +) + +// XEP-0092 Software Version +type SoftwareVersion struct { + XMLName xml.Name `xml:"jabber:iq:version query"` + Name string `xml:"name,omitempty"` + Version string `xml:"version,omitempty"` + OS string `xml:"os,omitempty"` +} diff --git a/src/xmpp/stanza.go b/src/xmpp/stanza.go index dd51f7f..37f3270 100644 --- a/src/xmpp/stanza.go +++ b/src/xmpp/stanza.go @@ -6,7 +6,6 @@ import ( "fmt" ) - const ( IqTypeGet = "get" IqTypeSet = "set" @@ -14,7 +13,6 @@ const ( IqTypeError = "error" ) - // XMPP stanza. type Iq struct { XMLName xml.Name `xml:"iq"` @@ -81,10 +79,10 @@ type Presence struct { Type string `xml:"type,attr,omitempty"` To string `xml:"to,attr,omitempty"` From string `xml:"from,attr,omitempty"` - Show string `xml:"show"` // away, chat, dnd, xa - Status string `xml:"status"` // sb []clientText - Photo string `xml:"photo,omitempty"` // Avatar - Nick string `xml:"nick,omitempty"` // Nickname + Show string `xml:"show"` // away, chat, dnd, xa + Status string `xml:"status"` // sb []clientText + Photo string `xml:"photo,omitempty"` // Avatar + Nick string `xml:"nick,omitempty"` // Nickname } // XMPP . May occur as a top-level stanza or embedded in another