diff --git a/xmpp.go b/xmpp.go index b0a8e6d..0487e73 100644 --- a/xmpp.go +++ b/xmpp.go @@ -1296,7 +1296,7 @@ func (c *Client) SendPresence(presence Presence) (n int, err error) { buf = buf + fmt.Sprintf("%s", xmlEscape(presence.Status)) } - stanza := fmt.Sprintf(buf + "") + stanza := fmt.Sprintf(buf + "\n") if c.LimitMaxBytes != 0 && len(stanza) > c.LimitMaxBytes { return 0, fmt.Errorf("stanza size (%v bytes) exceeds server limit (%v bytes)", len(stanza), c.LimitMaxBytes) diff --git a/xmpp_muc.go b/xmpp_muc.go index 25b247e..a80c3e3 100644 --- a/xmpp_muc.go +++ b/xmpp_muc.go @@ -33,10 +33,10 @@ func (c *Client) JoinMUCNoHistory(jid, nick string) (n int, err error) { if nick == "" { nick = c.jid } - return fmt.Fprintf(c.stanzaWriter, "\n"+ + return fmt.Fprintf(c.stanzaWriter, ""+ ""+ - "\n"+ - "", + ""+ + "\n", xmlEscape(jid), xmlEscape(nick), nsMUC) } @@ -53,7 +53,7 @@ func (c *Client) JoinMUC(jid, nick string, history_type, history int, history_da xmlEscape(jid), xmlEscape(nick), nsMUC) case CharHistory: return fmt.Fprintf(c.stanzaWriter, ""+ - "\n"+ + ""+ ""+ "\n", xmlEscape(jid), xmlEscape(nick), nsMUC, history)