From 2271ce0aecb03e6f63b826204816cd3a6928f41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20M=C3=BCller?= Date: Wed, 15 Nov 2017 09:47:24 +0100 Subject: [PATCH] add method to send IQ messages without element --- xmpp_information_query.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xmpp_information_query.go b/xmpp_information_query.go index d89379a..2a69922 100644 --- a/xmpp_information_query.go +++ b/xmpp_information_query.go @@ -22,3 +22,10 @@ func (c *Client) RawInformationQuery(from, to, id, iqType, requestNamespace, bod _, err := fmt.Fprintf(c.conn, xmlIQ, xmlEscape(from), xmlEscape(to), id, iqType, requestNamespace, body) return id, err } + +// rawInformation send a IQ request with the the payload body to the server +func (c *Client) RawInformation(from, to, id, iqType, body string) (string, error) { + const xmlIQ = "%s" + _, err := fmt.Fprintf(c.conn, xmlIQ, xmlEscape(from), xmlEscape(to), id, iqType, body) + return id, err +}