From 51bea3323498986ac13df3d99157c2b8db83484a Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 3 May 2012 11:21:11 +0200 Subject: contact: compare TpContact objects rather than handles https://bugzilla.gnome.org/show_bug.cgi?id=675229 --- libempathy/empathy-contact.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libempathy') diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 704a64f97..b741210dd 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -229,8 +229,7 @@ contact_constructed (GObject *object) EmpathyContact *contact = (EmpathyContact *) object; EmpathyContactPriv *priv = GET_PRIV (contact); GHashTable *location; - TpHandle self_handle; - TpHandle handle; + TpContact *self_contact; const gchar * const *client_types; if (priv->tp_contact == NULL) @@ -254,10 +253,9 @@ contact_constructed (GObject *object) /* Set is-user property. Note that it could still be the handle is * different from the connection's self handle, in the case the handle * comes from a group interface. */ - self_handle = tp_connection_get_self_handle ( + self_contact = tp_connection_get_self_contact ( tp_contact_get_connection (priv->tp_contact)); - handle = tp_contact_get_handle (priv->tp_contact); - empathy_contact_set_is_user (contact, self_handle == handle); + empathy_contact_set_is_user (contact, self_contact == priv->tp_contact); g_signal_connect (priv->tp_contact, "notify", G_CALLBACK (tp_contact_notify_cb), contact); -- cgit v1.2.3