Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vCard-based address book export API #5203

Closed
link2xt opened this issue Jan 21, 2024 · 1 comment
Closed

vCard-based address book export API #5203

link2xt opened this issue Jan 21, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@link2xt
Copy link
Collaborator

link2xt commented Jan 21, 2024

This is the next step after #5202 (adding vCard-based address book import API).

Importing address book from a file will need to be an explicit action in the settings. There is also an idea to stop requesting permission for address book import when contact list is opened and move phone address book import action into settings as well for multiple reasons: permission request popup is annoying when you just want to get a list of contacts, users typically don't have emails in phone address book and email alone is not helpful for chatmail accounts which also need a key to send encrypted messages.

In any case, once there is any import action there can be an export action next to it just like for account and key backups. In the UI I imagine a dialog or screen listing all the contacts with checkmarks next to them. All contacts are selected by default and user can deselect all of them, then search and select contacts that need to be exported. To implement it we need a JSON-RPC API that accepts a list of contact IDs and returns a string with a .vcf file contents. Saving the file to disk or sharing it should be done in the UI.

vcard crate may be useful for generating vCard. It was used in #1279 but other crates could be evaluated.

Primary usecase for this API is exporting contacts from one account and importing into a new one, especially exporting the contacts with all keys from existing account and importing into chatmail account so chatmail account can send encrypted messages.
This usecase of moving contacts from one Delta Chat account was mentioned in the support forum: https://support.delta.chat/t/better-contact-handling/705
Quotes: "It’s a bit difficult (if not extremely tedious), when we change accounts in DC, export our contacts", "+1 it are very difficult in the Android version you must change the account, copy the contact, go back … Uff it are very tedious process".
API does not need any options to select what information about the contacts is exported, exported file is supposed to be used locally. Address book export may still be shared with trusted users, e.g. in a community/company to introduce new members to everyone else, but it is not the primary use case.

Note that this issue is not about "share contact" feature improvements. For sharing a contact we may need a new viewtype, a different API focused on exporting a single contact with the ability to exclude some fields, API to preview sent or received vCard etc. Discussing "share contact" is outside of the scope of this issue.

@link2xt link2xt added the enhancement New feature or request label Jan 21, 2024
iequidoo added a commit that referenced this issue May 14, 2024
Add a function returning a vCard containing contacts with the given ids.
TODO: tests
iequidoo added a commit that referenced this issue May 15, 2024
Add a function returning a vCard containing contacts with the given ids.
iequidoo added a commit that referenced this issue May 16, 2024
Add a function returning a vCard containing contacts with the given ids.
iequidoo added a commit that referenced this issue May 16, 2024
Add a function returning a vCard containing contacts with the given ids.
iequidoo added a commit that referenced this issue May 16, 2024
Add a function returning a vCard containing contacts with the given ids.
iequidoo added a commit that referenced this issue May 16, 2024
Add a function returning a vCard containing contacts with the given ids.
@iequidoo iequidoo self-assigned this May 16, 2024
@iequidoo
Copy link
Collaborator

Done in #5571

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants