diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-03-18 08:28:03 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-04-22 18:21:14 +0800 |
commit | 7761eeb4a0e307c14a96906cca1a94346f39c3a6 (patch) | |
tree | a0cf285000890c0633bdc1031bddcb73f9b952d5 /libempathy/empathy-tp-contact-factory.c | |
parent | 2914c6d76ae6a76e551ccaad01bc9edf2f375d08 (diff) | |
download | gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.tar gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.tar.gz gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.tar.bz2 gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.tar.lz gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.tar.xz gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.tar.zst gsoc2013-empathy-7761eeb4a0e307c14a96906cca1a94346f39c3a6.zip |
Use tp_connection_get_self_handle where needed
Diffstat (limited to 'libempathy/empathy-tp-contact-factory.c')
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index b96af76b8..7735b0f1a 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -502,6 +502,7 @@ tp_contact_factory_add_contact (EmpathyTpContactFactory *tp_factory, EmpathyContact *contact) { EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory); + TpHandle self_handle; TpHandle handle; GArray handles = {(gchar*) &handle, 1}; GHashTable *tokens; @@ -529,8 +530,14 @@ tp_contact_factory_add_contact (EmpathyTpContactFactory *tp_factory, empathy_contact_set_capabilities (contact, caps); } - /* FIXME: This should be done by TpContact */ + /* 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 (priv->connection); handle = empathy_contact_get_handle (contact); + empathy_contact_set_is_user (contact, self_handle == handle); + + /* FIXME: This should be done by TpContact */ tp_cli_connection_interface_avatars_run_get_known_avatar_tokens (priv->connection, -1, &handles, |