From d03bc801daa138c673c1d90ea575db41b9c66975 Mon Sep 17 00:00:00 2001 From: Teoman Soygul Date: Sat, 15 Nov 2014 19:43:43 +0100 Subject: [PATCH] add send/sendorg return values --- xmpp.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmpp.go b/xmpp.go index 129eb40..ceb5a2a 100644 --- a/xmpp.go +++ b/xmpp.go @@ -535,15 +535,15 @@ func (c *Client) Recv() (event interface{}, err error) { } // Send sends message text. -func (c *Client) Send(chat Chat) { - fmt.Fprintf(c.conn, ""+ +func (c *Client) Send(chat Chat) (n int, err error) { + return fmt.Fprintf(c.conn, ""+ "%s", xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text)) } // Send origin -func (c *Client) SendOrg(org string) { - fmt.Fprint(c.conn, org) +func (c *Client) SendOrg(org string) (n int, err error) { + return fmt.Fprint(c.conn, org) } // RFC 3920 C.1 Streams name space