mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-01-09 10:09:21 -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:
@@ -69,12 +69,18 @@ type Bind struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"`
|
||||
Resource string `xml:"resource,omitempty"`
|
||||
Jid string `xml:"jid,omitempty"`
|
||||
// Result sets
|
||||
ResultSet *ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
func (b *Bind) Namespace() string {
|
||||
return b.XMLName.Space
|
||||
}
|
||||
|
||||
func (b *Bind) GetSet() *ResultSet {
|
||||
return b.ResultSet
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Session (Obsolete)
|
||||
|
||||
@@ -89,12 +95,18 @@ func (b *Bind) Namespace() string {
|
||||
type StreamSession struct {
|
||||
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-session session"`
|
||||
Optional bool // If element does exist, it mean we are not required to open session
|
||||
// Result sets
|
||||
ResultSet *ResultSet `xml:"set,omitempty"`
|
||||
}
|
||||
|
||||
func (s *StreamSession) Namespace() string {
|
||||
return s.XMLName.Space
|
||||
}
|
||||
|
||||
func (s *StreamSession) GetSet() *ResultSet {
|
||||
return s.ResultSet
|
||||
}
|
||||
|
||||
func (s *StreamSession) IsOptional() bool {
|
||||
if s.XMLName.Local == "session" {
|
||||
return s.Optional
|
||||
|
||||
Reference in New Issue
Block a user