avatar: use unique id for stanza id

"retrieve1" should have been only for testing.
This commit is contained in:
Michael Vetter
2020-02-07 21:12:59 +01:00
parent 772224421d
commit ce48525e99
3 changed files with 10 additions and 7 deletions

View File

@@ -2577,9 +2577,9 @@ stanza_get_child_by_name_and_ns(xmpp_stanza_t * const stanza, const char * const
}
xmpp_stanza_t*
stanza_create_avatar_retrieve_data_request(xmpp_ctx_t *ctx, const char *const id, const char *const jid)
stanza_create_avatar_retrieve_data_request(xmpp_ctx_t *ctx, const char *stanza_id, const char *const item_id, const char *const jid)
{
xmpp_stanza_t *iq = xmpp_iq_new(ctx, STANZA_TYPE_GET, "retrieve1");
xmpp_stanza_t *iq = xmpp_iq_new(ctx, STANZA_TYPE_GET, stanza_id);
xmpp_stanza_set_to(iq, jid);
xmpp_stanza_t *pubsub = xmpp_stanza_new(ctx);
@@ -2594,7 +2594,7 @@ stanza_create_avatar_retrieve_data_request(xmpp_ctx_t *ctx, const char *const id
xmpp_stanza_t *item = xmpp_stanza_new(ctx);
xmpp_stanza_set_name(item, STANZA_NAME_ITEM);
xmpp_stanza_set_attribute(item, "id", id);
xmpp_stanza_set_attribute(item, "id", item_id);
xmpp_stanza_add_child(items, item);
xmpp_stanza_add_child(pubsub, items);