diff options
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tp-contact-factory.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c index ffd3087da..b8be403c6 100644 --- a/libempathy/empathy-tp-contact-factory.c +++ b/libempathy/empathy-tp-contact-factory.c @@ -857,7 +857,13 @@ tp_contact_factory_add_contact (EmpathyTpContactFactory *tp_factory, G_OBJECT (tp_factory)); } - if (tp_proxy_has_interface_by_id (priv->connection, + if (priv->contact_caps_supported) { + tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ( + priv->connection, -1, &handles, + tp_contact_factory_got_contact_capabilities, NULL, NULL, + G_OBJECT (tp_factory)); + } + else if (tp_proxy_has_interface_by_id (priv->connection, TP_IFACE_QUARK_CONNECTION_INTERFACE_CAPABILITIES)) { tp_cli_connection_interface_capabilities_call_get_capabilities ( priv->connection, -1, &handles, @@ -876,13 +882,6 @@ tp_contact_factory_add_contact (EmpathyTpContactFactory *tp_factory, NULL); } - if (priv->contact_caps_supported) { - tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities ( - priv->connection, -1, &handles, - tp_contact_factory_got_contact_capabilities, NULL, NULL, - G_OBJECT (tp_factory)); - } - DEBUG ("Contact added: %s (%d)", empathy_contact_get_id (contact), empathy_contact_get_handle (contact)); @@ -1429,18 +1428,6 @@ connection_ready_cb (TpConnection *connection, NULL, NULL, G_OBJECT (tp_factory), NULL); - tp_cli_connection_interface_capabilities_connect_to_capabilities_changed (priv->connection, - tp_contact_factory_capabilities_changed_cb, - NULL, NULL, - G_OBJECT (tp_factory), - NULL); - - - tp_cli_connection_interface_location_connect_to_location_updated (priv->connection, - tp_contact_factory_location_updated_cb, - NULL, NULL, - G_OBJECT (tp_factory), - NULL); if (tp_proxy_has_interface_by_id (connection, TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_CAPABILITIES)) { @@ -1450,6 +1437,19 @@ connection_ready_cb (TpConnection *connection, priv->connection, tp_contact_factory_contact_capabilities_changed_cb, NULL, NULL, G_OBJECT (tp_factory), NULL); } + else { + tp_cli_connection_interface_capabilities_connect_to_capabilities_changed (priv->connection, + tp_contact_factory_capabilities_changed_cb, + NULL, NULL, + G_OBJECT (tp_factory), + NULL); + } + + tp_cli_connection_interface_location_connect_to_location_updated (priv->connection, + tp_contact_factory_location_updated_cb, + NULL, NULL, + G_OBJECT (tp_factory), + NULL); tp_cli_connection_interface_avatars_call_get_avatar_requirements (priv->connection, -1, |