]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-contact-list.c
Use Conn.I.CB to report contacts as abusive when blocking them
[empathy.git] / libempathy / empathy-tp-contact-list.c
index 028744285da8cbcb5e829a5a4e8febf57eaeb879..90932a20a7b5bfd4b9a79114f488a821e04d8013 100644 (file)
@@ -1358,14 +1358,23 @@ tp_contact_list_set_blocked (EmpathyContactList *list,
 
        g_return_if_fail (TP_IS_CHANNEL (priv->deny));
 
-       if (blocked)
+       if (blocked && abusive) {
+               /* we have to do this via the new interface */
+               g_return_if_fail (priv->flags &
+                               EMPATHY_CONTACT_LIST_CAN_REPORT_ABUSIVE);
+
+               emp_cli_connection_interface_contact_blocking_call_block_contacts (
+                       TP_PROXY (priv->connection), -1,
+                       &handles, TRUE, NULL, NULL, NULL, NULL);
+       } else if (blocked) {
                tp_cli_channel_interface_group_call_add_members (
                        priv->deny, -1,
                        &handles, NULL, NULL, NULL, NULL, NULL);
-       else
+       } else {
                tp_cli_channel_interface_group_call_remove_members (
                        priv->deny, -1,
                        &handles, NULL, NULL, NULL, NULL, NULL);
+       }
 }
 
 static gboolean