]> git.0d.be Git - empathy.git/commitdiff
Make _get_invitation more reliable
authorXavier Claessens <xclaesse@src.gnome.org>
Thu, 8 May 2008 17:30:37 +0000 (17:30 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Thu, 8 May 2008 17:30:37 +0000 (17:30 +0000)
svn path=/trunk/; revision=1092

libempathy/empathy-tp-group.c

index 29a786dc048fb12b1e037e8937969ef42bc1ddcb..ca7ff491f7a6f1db6c849fc8d3fc390928a9706a 100644 (file)
@@ -949,11 +949,16 @@ empathy_tp_group_get_invitation (EmpathyTpGroup  *group,
                }
        }
 
-       if (invitation && priv->members && !priv->members->next) {
-               contact = priv->members->data;
+       if (invitation) {
+               contact = invitation->actor;
        }
-       if (!invitation && priv->remote_pendings && !priv->remote_pendings->next) {
-               contact = priv->remote_pendings->data;
+       if (!invitation) {
+               if (priv->remote_pendings) {
+                       contact = priv->remote_pendings->data;
+               }
+               else if (priv->members) {
+                       contact = priv->members->data;
+               }
        }
 
        if (remote_contact && contact) {