[empathy] invite-participant-dialog: compare TpContact objects rather than handles



commit 12c633ddc23c83b660b33b841c420d410e580a59
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu May 3 11:21:11 2012 +0200

    invite-participant-dialog: compare TpContact objects rather than handles
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675229

 src/empathy-invite-participant-dialog.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/empathy-invite-participant-dialog.c b/src/empathy-invite-participant-dialog.c
index 3e35e83..ecbf00b 100644
--- a/src/empathy-invite-participant-dialog.c
+++ b/src/empathy-invite-participant-dialog.c
@@ -150,19 +150,17 @@ filter_individual (EmpathyContactChooser *chooser,
   for (l = members; l != NULL; l = g_list_next (l))
     {
       EmpathyContact *member = l->data;
-      TpHandle handle;
       TpContact *owner;
 
-      /* Try to get the non-channel specific handle. */
+      /* Try to get the non-channel specific contact. */
       owner = tp_channel_group_get_contact_owner (
           TP_CHANNEL (self->priv->tp_chat),
           empathy_contact_get_tp_contact (member));
-      handle = tp_contact_get_handle (owner);
 
-      if (handle == 0)
-        handle = empathy_contact_get_handle (member);
+      if (owner == NULL)
+        owner = empathy_contact_get_tp_contact (member);
 
-      if (handle == tp_contact_get_handle (contact))
+      if (owner == contact)
         {
           display = FALSE;
           break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]