diff --git a/xmpp.go b/xmpp.go
index 8a00282..078270f 100644
--- a/xmpp.go
+++ b/xmpp.go
@@ -661,7 +661,7 @@ func (c *Client) Send(chat Chat) (n int, err error) {
thdtext = `` + xmlEscape(chat.Thread) + ``
}
- stanza := "" + subtext + "%s" + thdtext + ""
+ stanza := "" + subtext + "%s" + thdtext + ""
return fmt.Fprintf(c.conn, stanza,
xmlEscape(chat.Remote), xmlEscape(chat.Type), cnonce(), xmlEscape(chat.Text))
@@ -759,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
diff --git a/xmpp_muc.go b/xmpp_muc.go
index 7b50c12..840f4f9 100644
--- a/xmpp_muc.go
+++ b/xmpp_muc.go
@@ -8,19 +8,19 @@
package xmpp
import (
+ "errors"
"fmt"
"time"
- "errors"
)
const (
- nsMUC = "http://jabber.org/protocol/muc"
- nsMUCUser = "http://jabber.org/protocol/muc#user"
- NoHistory = 0
- CharHistory = 1
- StanzaHistory = 2
+ nsMUC = "http://jabber.org/protocol/muc"
+ nsMUCUser = "http://jabber.org/protocol/muc#user"
+ NoHistory = 0
+ CharHistory = 1
+ StanzaHistory = 2
SecondsHistory = 3
- SinceHistory = 4
+ SinceHistory = 4
)
// Send sends room topic wrapped inside an XMPP message stanza body.
@@ -47,35 +47,35 @@ func (c *Client) JoinMUC(jid, nick string, history_type, history int, history_da
}
switch history_type {
case NoHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC)
+ xmlEscape(jid), xmlEscape(nick), nsMUC)
case CharHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, history)
+ xmlEscape(jid), xmlEscape(nick), nsMUC, history)
case StanzaHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, history)
+ xmlEscape(jid), xmlEscape(nick), nsMUC, history)
case SecondsHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, history)
+ xmlEscape(jid), xmlEscape(nick), nsMUC, history)
case SinceHistory:
if history_date != nil {
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
+ "\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, history_date.Format(time.RFC3339))
+ xmlEscape(jid), xmlEscape(nick), nsMUC, history_date.Format(time.RFC3339))
}
}
return 0, errors.New("Unknown history option")
@@ -88,41 +88,41 @@ func (c *Client) JoinProtectedMUC(jid, nick string, password string, history_typ
}
switch history_type {
case NoHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
- "%s" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
+ "%s"+
+ "\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password))
+ xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password))
case CharHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"%s\n"+
"\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history)
+ xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history)
case StanzaHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"%s\n"+
"\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history)
+ xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history)
case SecondsHistory:
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"%s\n"+
"\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history)
+ xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history)
case SinceHistory:
if history_date != nil {
- return fmt.Fprintf(c.conn, "\n" +
- "\n" +
+ return fmt.Fprintf(c.conn, "\n"+
+ "\n"+
"%s\n"+
- "\n" +
+ "\n"+
"",
- xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history_date.Format(time.RFC3339))
+ xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password), history_date.Format(time.RFC3339))
}
}
return 0, errors.New("Unknown history option")