api: add legacy Python bindings for make_vcard and import_vcard

This commit is contained in:
link2xt
2025-04-01 19:42:26 +00:00
parent 9c5cf84c9f
commit b56cf72c87
2 changed files with 13 additions and 0 deletions

View File

@@ -90,6 +90,14 @@ class Contact:
dc_res = lib.dc_contact_get_profile_image(self._dc_contact)
return from_optional_dc_charpointer(dc_res)
def make_vcard(self) -> str:
"""Make a contact vCard.
:returns: vCard
"""
dc_context = self.account._dc_context
return from_dc_charpointer(lib.dc_make_vcard(dc_context, self.id))
@property
def status(self):
"""Get contact status.