diff --git a/xmpp_muc.go b/xmpp_muc.go index 314577a..0f14c4a 100644 --- a/xmpp_muc.go +++ b/xmpp_muc.go @@ -17,11 +17,14 @@ const ( ) // xep-0045 7.2 -func (c *Client) JoinMUC(jid string) { - fmt.Fprintf(c.conn, "\n"+ +func (c *Client) JoinMUC(jid, nick string) { + if nick == "" { + nick = c.jid + } + fmt.Fprintf(c.conn, "\n"+ "\n"+ "", - xmlEscape(jid), nsMUC) + xmlEscape(jid), xmlEscape(nick), nsMUC) } // xep-0045 7.14