Avoid adding self contact email addresses on sending mails (fixes NB#113807)
[modest] / src / hildon2 / modest-address-book.c
index 0cd0ca8..aaf6413 100644 (file)
@@ -705,6 +705,7 @@ async_get_contacts_cb (EBook *book,
 {
        GSList *addresses, *iter;
        GList *to_commit_contacts, *to_add_contacts;
+       EContact *self_contact;
 
        addresses = (GSList *) closure;
 
@@ -712,6 +713,11 @@ async_get_contacts_cb (EBook *book,
        if (status != E_BOOK_ERROR_OK)
                goto frees;
 
+       self_contact = (EContact *) osso_abook_self_contact_get_default ();
+       if (self_contact) {
+               contacts = g_list_prepend (contacts, self_contact);
+       }
+
        iter = addresses;
        to_commit_contacts = NULL;
        to_add_contacts = NULL;