From 861872c8db5f2704fea124d819619e5221501e45 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 16 Apr 2015 20:30:36 +0900 Subject: [PATCH] Add Roster() --- xmpp.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmpp.go b/xmpp.go index 28991f2..2012ce3 100644 --- a/xmpp.go +++ b/xmpp.go @@ -561,6 +561,12 @@ func (c *Client) SendHtml(chat Chat) (n int, err error) { xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text), chat.Text) } +// Roster asks for the chat roster. +func (c *Client) Roster() error { + fmt.Fprintf(c.conn, "\n", xmlEscape(c.jid)) + return nil +} + // RFC 3920 C.1 Streams name space type streamFeatures struct { XMLName xml.Name `xml:"http://etherx.jabber.org/streams features"`