diff options
Diffstat (limited to 'libempathy/empathy-individual-manager.c')
-rw-r--r-- | libempathy/empathy-individual-manager.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c index 8341b697e..fd0125f75 100644 --- a/libempathy/empathy-individual-manager.c +++ b/libempathy/empathy-individual-manager.c @@ -389,6 +389,7 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self, EmpathyContact *contact) { EmpathyIndividualManagerPriv *priv; + EmpathyContactManager *contact_manager; FolksBackendStore *backend_store; FolksBackend *backend; FolksPersonaStore *persona_store; @@ -443,6 +444,19 @@ empathy_individual_manager_add_from_contact (EmpathyIndividualManager *self, g_hash_table_destroy (details); + /* unblock the EmpathyContact */ + contact_manager = empathy_contact_manager_dup_singleton (); + + if (empathy_contact_manager_get_flags_for_connection (contact_manager, + empathy_contact_get_connection (contact)) & + EMPATHY_CONTACT_LIST_CAN_BLOCK) + { + empathy_contact_list_set_blocked (EMPATHY_CONTACT_LIST (contact_manager), + contact, FALSE, FALSE); + } + + g_object_unref (contact_manager); + finish: tp_clear_object (&backend); tp_clear_object (&backend_store); |