mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 12:46:21 +00:00
Add vCard support
Only nicknames, photos, birthdays, addresses, telephone numbers, emails, JIDs, titles, roles, notes, and URLs are supported Due to the synopsis array not having enough space, `/vcard photo open-self` and `/vcard photo save-self` are not documented properly in the synopsis section of the `/vcard` command, but they are documented in the arguments section Fixed memory leak in vcard autocomplete (thanks to debXwoody)
This commit is contained in:
@@ -2687,6 +2687,25 @@ stanza_create_avatar_metadata_publish_iq(xmpp_ctx_t* ctx, const char* img_data,
|
||||
return iq;
|
||||
}
|
||||
|
||||
xmpp_stanza_t*
|
||||
stanza_create_vcard_request_iq(xmpp_ctx_t* ctx, const char* const jid, const char* const stanza_id)
|
||||
{
|
||||
xmpp_stanza_t* iq = xmpp_iq_new(ctx, STANZA_TYPE_GET, stanza_id);
|
||||
xmpp_stanza_set_from(iq, connection_get_fulljid());
|
||||
if (jid) {
|
||||
xmpp_stanza_set_to(iq, jid);
|
||||
}
|
||||
|
||||
xmpp_stanza_t* vcard = xmpp_stanza_new(ctx);
|
||||
xmpp_stanza_set_name(vcard, STANZA_NAME_VCARD);
|
||||
xmpp_stanza_set_ns(vcard, STANZA_NS_VCARD);
|
||||
|
||||
xmpp_stanza_add_child(iq, vcard);
|
||||
xmpp_stanza_release(vcard);
|
||||
|
||||
return iq;
|
||||
}
|
||||
|
||||
xmpp_stanza_t*
|
||||
stanza_attach_correction(xmpp_ctx_t* ctx, xmpp_stanza_t* stanza, const char* const replace_id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user