XMPP::VCard
VCard is a high-level client for XEP-0054 - vcard-temp.
vcard-temp is a legacy form of structured user data (name, address, photo) exchanged as an IQ get/set against a user's bare JID. Servers that support it do not advertise a disco feature; support is instead determined by whether the vcard-temp IQ succeeds.
vc = XMPP::VCard.new(client) card = vc.fetch # => Stanza::VCard? for the current user card.fn = "Juliet Capulet" card.set(card)
See: https://xmpp.org/extensions/xep-0054.html
Constants
Disco feature is not used by vcard-temp, but is exposed for symmetry.
Constructors
Instance methods
fetch retrieves the vCard stored for the given bare JID (defaults to the current user). Returns the Stanza::VCard payload on a successful result, or nil on error or timeout.
set stores the given vCard against the current user. Returns the result/error IQ (nil on timeout); callers check type == "result".