mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2026-05-23 20:33:46 -07:00
Add SendPresence, add join muc with history, add function return values in xmpp_muc
This commit is contained in:
@@ -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'>"+
|
||||
|
||||
Reference in New Issue
Block a user