Add SendPresence, add join muc with history, add function return values in xmpp_muc

This commit is contained in:
Thorsten Riess
2016-02-04 08:17:25 +01:00
parent 54cdc20727
commit 7c0791141b
2 changed files with 105 additions and 14 deletions
+4
View File
@@ -610,6 +610,10 @@ func (c *Client) SendOrg(org string) (n int, err error) {
return fmt.Fprint(c.conn, org)
}
func (c *Client) SendPresence(presence Presence) (n int, err error) {
return fmt.Fprintf(c.conn, "<presence from='%s' to='%s'/>", xmlEscape(presence.From), xmlEscape(presence.To))
}
// SendHtml sends the message as HTML as defined by XEP-0071
func (c *Client) SendHtml(chat Chat) (n int, err error) {
return fmt.Fprintf(c.conn, "<message to='%s' type='%s' xml:lang='en'>"+