Implement xmpp_stanza_reply()

This function creates a copy of the given stanza minus its children and
set the “to” attribute with the value of the original “from”.
This commit is contained in:
Tristan Le Guern
2015-07-29 16:11:12 +02:00
committed by Dmitry Podgorny
parent 21f742f888
commit 9de0293405
2 changed files with 42 additions and 3 deletions

View File

@@ -360,9 +360,7 @@ int xmpp_stanza_set_from(xmpp_stanza_t * const stanza,
const char * const from);
/* allocate and initialize a stanza in reply to another */
/* unimplemented
xmpp_stanza_t *xmpp_stanza_reply(const xmpp_stanza_t *stanza);
*/
xmpp_stanza_t *xmpp_stanza_reply(xmpp_stanza_t * const stanza);
/* stanza subclasses */
/* unimplemented