forked from jshiffer/go-xmpp
add method to send IQ messages without <query> element
This commit is contained in:
parent
fda8e5cb42
commit
2271ce0aec
@ -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)
|
_, err := fmt.Fprintf(c.conn, xmlIQ, xmlEscape(from), xmlEscape(to), id, iqType, requestNamespace, body)
|
||||||
return id, err
|
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 = "<iq from='%s' to='%s' id='%s' type='%s'>%s</iq>"
|
||||||
|
_, err := fmt.Fprintf(c.conn, xmlIQ, xmlEscape(from), xmlEscape(to), id, iqType, body)
|
||||||
|
return id, err
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user