mirror of
https://github.com/chatmail/core.git
synced 2026-05-03 21:36:29 +03:00
api: Add make_vcard() (#5203)
Add a function returning a vCard containing contacts with the given ids.
This commit is contained in:
@@ -1437,6 +1437,13 @@ impl CommandApi {
|
||||
.collect())
|
||||
}
|
||||
|
||||
/// Returns a vCard containing contacts with the given ids.
|
||||
async fn make_vcard(&self, account_id: u32, contacts: Vec<u32>) -> Result<String> {
|
||||
let ctx = self.get_context(account_id).await?;
|
||||
let contacts: Vec<_> = contacts.iter().map(|&c| ContactId::new(c)).collect();
|
||||
deltachat::contact::make_vcard(&ctx, &contacts).await
|
||||
}
|
||||
|
||||
// ---------------------------------------------
|
||||
// chat
|
||||
// ---------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user