Use libstrophe xmpp_message_new convenience function

This commit is contained in:
James Booth
2016-08-20 19:08:13 +01:00
parent 45048e3ac8
commit 39ff399626
2 changed files with 12 additions and 22 deletions

View File

@@ -602,12 +602,10 @@ void
_message_send_receipt(const char *const fulljid, const char *const message_id)
{
xmpp_ctx_t * const ctx = connection_get_ctx();
xmpp_stanza_t *message = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(message, STANZA_NAME_MESSAGE);
char *id = create_unique_id("receipt");
xmpp_stanza_set_id(message, id);
xmpp_stanza_t *message = xmpp_message_new(ctx, NULL, fulljid, id);
free(id);
xmpp_stanza_set_to(message, fulljid);
xmpp_stanza_t *receipt = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(receipt, "received");