diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-03 17:21:11 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-05-03 17:25:19 +0800 |
commit | 51bea3323498986ac13df3d99157c2b8db83484a (patch) | |
tree | c25fbf70d7b27dc7f37acdc5a3193c2e5e73ce96 /libempathy | |
parent | 12c633ddc23c83b660b33b841c420d410e580a59 (diff) | |
download | gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.tar gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.tar.gz gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.tar.bz2 gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.tar.lz gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.tar.xz gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.tar.zst gsoc2013-empathy-51bea3323498986ac13df3d99157c2b8db83484a.zip |
contact: compare TpContact objects rather than handles
https://bugzilla.gnome.org/show_bug.cgi?id=675229
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-contact.c | 8 |
1 files changed, 3 insertions, 5 deletions
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); |