forked from jshiffer/go-xmpp
Fix MUC NoHistory invalid XML
This commit is contained in:
parent
906d9d747d
commit
7ec8e81ec3
@ -48,7 +48,7 @@ func (c *Client) JoinMUC(jid, nick string, history_type, history int, history_da
|
|||||||
switch history_type {
|
switch history_type {
|
||||||
case NoHistory:
|
case NoHistory:
|
||||||
return fmt.Fprintf(c.conn, "<presence to='%s/%s'>\n" +
|
return fmt.Fprintf(c.conn, "<presence to='%s/%s'>\n" +
|
||||||
"<x xmlns='%s' />\n" +
|
"<x xmlns='%s' /></x>\n" +
|
||||||
"</presence>",
|
"</presence>",
|
||||||
xmlEscape(jid), xmlEscape(nick), nsMUC)
|
xmlEscape(jid), xmlEscape(nick), nsMUC)
|
||||||
case CharHistory:
|
case CharHistory:
|
||||||
@ -90,7 +90,7 @@ func (c *Client) JoinProtectedMUC(jid, nick string, password string, history_typ
|
|||||||
case NoHistory:
|
case NoHistory:
|
||||||
return fmt.Fprintf(c.conn, "<presence to='%s/%s'>\n" +
|
return fmt.Fprintf(c.conn, "<presence to='%s/%s'>\n" +
|
||||||
"<x xmlns='%s'>\n" +
|
"<x xmlns='%s'>\n" +
|
||||||
"<password>%s</password>\n"+
|
"<password>%s</password></x>\n"+
|
||||||
"</presence>",
|
"</presence>",
|
||||||
xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password))
|
xmlEscape(jid), xmlEscape(nick), nsMUC, xmlEscape(password))
|
||||||
case CharHistory:
|
case CharHistory:
|
||||||
|
Loading…
Reference in New Issue
Block a user