Minor cleanup

disco_info_form
Mickael Remond 6 years ago
parent 24b8d7da3d
commit d6bedfb033
No known key found for this signature in database
GPG Key ID: E6F6045D79965AA3

@ -10,7 +10,7 @@ import (
"time"
)
// Client is the main structure use to connect as a client on an XMPP
// Client is the main structure used to connect as a client on an XMPP
// server.
type Client struct {
// Store user defined options

@ -41,10 +41,13 @@ func main() {
reply := p.MakeError(xError)
component.xmpp.Send(&reply)
}
case xmpp.Message:
fmt.Println("Received message:", p.Body)
case xmpp.Presence:
fmt.Println("Received presence:", p.Type)
default:
fmt.Println("ignoring packet:", packet)
}

@ -10,7 +10,7 @@ import (
)
/*
TODO support ability to put Raw payload
TODO support ability to put Raw payload inside IQ
*/
// ============================================================================
@ -45,6 +45,7 @@ func (x *Err) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
}
}
// Check subelements to extract error text and reason (from local namespace).
for {
t, err := d.Token()
if err != nil {

Loading…
Cancel
Save