if (!contact || !book)
return;
-#if MODEST_ABOOK_API < 2
+#if MODEST_ABOOK_API < 4
osso_abook_contact_commit(contact, is_new, book);
#else
- osso_abook_contact_commit(contact, is_new, book, NULL);
+ if (OSSO_IS_ABOOK_CONTACT (contact)) {
+ osso_abook_contact_commit(contact, is_new, book, NULL);
+ } else {
+ e_book_commit_contact (book, contact, NULL);
+ }
#endif /* MODEST_ABOOK_API < 2 */
}