diff --git a/xmpp.go b/xmpp.go
index d10623f..8a00282 100644
--- a/xmpp.go
+++ b/xmpp.go
@@ -660,8 +660,11 @@ func (c *Client) Send(chat Chat) (n int, err error) {
if chat.Thread != `` {
thdtext = `` + xmlEscape(chat.Thread) + ``
}
- return fmt.Fprintf(c.conn, ""+subtext+"%s"+thdtext+"",
- xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text))
+
+ stanza := "" + subtext + "%s" + thdtext + ""
+
+ return fmt.Fprintf(c.conn, stanza,
+ xmlEscape(chat.Remote), xmlEscape(chat.Type), cnonce(), xmlEscape(chat.Text))
}
// SendOrg sends the original text without being wrapped in an XMPP message stanza.
@@ -756,7 +759,7 @@ type saslFailure struct {
type bindBind struct {
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"`
Resource string
- Jid string `xml:"jid"`
+ Jid string `xml:"jid"`
}
// RFC 3921 B.1 jabber:client
@@ -836,7 +839,8 @@ type clientPresence struct {
Error *clientError
}
-type clientIQ struct { // info/query
+type clientIQ struct {
+ // info/query
XMLName xml.Name `xml:"jabber:client iq"`
From string `xml:"from,attr"`
ID string `xml:"id,attr"`