aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorDanielle Madeley <danielle.madeley@collabora.co.uk>2012-01-17 11:30:06 +0800
committerDanielle Madeley <danielle.madeley@collabora.co.uk>2012-01-17 17:09:52 +0800
commit5c615ca9c2ffcff23925c154e36dfeccf416ec30 (patch)
treeda1bc560a67e9a9b925882828fe02091c5ffdac9 /libempathy
parent40aba36f8560ebbeae32c29f472576f80adec1e9 (diff)
downloadgsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.tar
gsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.tar.gz
gsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.tar.bz2
gsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.tar.lz
gsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.tar.xz
gsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.tar.zst
gsoc2013-empathy-5c615ca9c2ffcff23925c154e36dfeccf416ec30.zip
client-factory: ensure alias, presence, capabilities and avatar are prepared
Sometimes contacts are assumed to have these features prepared, but they don't always. Ensure they are prepared by the factory.
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-client-factory.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/libempathy/empathy-client-factory.c b/libempathy/empathy-client-factory.c
index 035c56956..294eaf5ff 100644
--- a/libempathy/empathy-client-factory.c
+++ b/libempathy/empathy-client-factory.c
@@ -169,15 +169,21 @@ empathy_client_factory_dup_contact_features (TpSimpleClientFactory *factory,
TpConnection *connection)
{
GArray *features;
- TpContactFeature feature;
+ TpContactFeature extra_features[] = {
+ TP_CONTACT_FEATURE_ALIAS,
+ TP_CONTACT_FEATURE_PRESENCE,
+ TP_CONTACT_FEATURE_AVATAR_TOKEN,
+ TP_CONTACT_FEATURE_AVATAR_DATA,
+ TP_CONTACT_FEATURE_CAPABILITIES,
+ /* Needed by empathy_individual_add_menu_item_new to check if a contact
+ * is already in the contact list. This feature is pretty cheap to
+ * prepare as it doesn't prepare the full roster. */
+ TP_CONTACT_FEATURE_SUBSCRIPTION_STATES,
+ };
features = chainup->dup_contact_features (factory, connection);
- /* Needed by empathy_individual_add_menu_item_new to check if a contact is
- * already in the contact list. This feature is pretty cheap to prepare as
- * it doesn't prepare the full roster. */
- feature = TP_CONTACT_FEATURE_SUBSCRIPTION_STATES;
- g_array_append_val (features, feature);
+ g_array_append_vals (features, extra_features, G_N_ELEMENTS (extra_features));
return features;
}