]> git.0d.be Git - empathy.git/commitdiff
Enforce use only of TpfPersonas
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 9 Jul 2010 13:22:54 +0000 (14:22 +0100)
committerTravis Reitter <treitter@gmail.com>
Wed, 21 Jul 2010 20:25:35 +0000 (13:25 -0700)
If we only allow EmpathyContacts to be linked to TpfPersonas, we can
make some assumptions about which interfaces are available on the
personas for efficiency purposes.

libempathy/empathy-contact.c

index a5b799793b28d0bf6983684dd08a49aa5721ab78..8384d2714963f6025cbc6f829c12485770a7bf7a 100644 (file)
@@ -803,7 +803,7 @@ empathy_contact_set_persona (EmpathyContact *contact,
   EmpathyContactPriv *priv;
 
   g_return_if_fail (EMPATHY_IS_CONTACT (contact));
-  g_return_if_fail (FOLKS_IS_PERSONA (persona));
+  g_return_if_fail (TPF_IS_PERSONA (persona));
 
   priv = GET_PRIV (contact);
 
@@ -824,9 +824,7 @@ empathy_contact_set_persona (EmpathyContact *contact,
   /* Set the persona's groups */
   if (priv->groups != NULL)
     {
-      if (FOLKS_IS_GROUPS (persona))
-        folks_groups_set_groups (FOLKS_GROUPS (persona), priv->groups);
-
+      folks_groups_set_groups (FOLKS_GROUPS (persona), priv->groups);
       g_hash_table_destroy (priv->groups);
       priv->groups = NULL;
     }