]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-tp-chat.c
tp-chat: prepare CONTACTS before our custom feature
[empathy.git] / libempathy / empathy-tp-chat.c
index 4711affcb28454b18e6aaca42661295a2dfc7691..6d2d0a9c9e6e5023029aab8b58cdf1cc89f05170 100644 (file)
@@ -21,6 +21,9 @@
 #include "config.h"
 #include "empathy-tp-chat.h"
 
+#include <tp-account-widgets/tpaw-utils.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
+
 #include "empathy-request-util.h"
 #include "empathy-utils.h"
 
@@ -964,13 +967,14 @@ static const TpProxyFeature *
 tp_chat_list_features (TpProxyClass *cls G_GNUC_UNUSED)
 {
   static TpProxyFeature features[N_FEAT + 1] = { { 0 } };
-  static GQuark need[2] = {0, 0};
+  static GQuark need[3] = {0, 0, 0};
 
   if (G_LIKELY (features[0].name != 0))
     return features;
 
   features[FEAT_READY].name = EMPATHY_TP_CHAT_FEATURE_READY;
   need[0] = TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES;
+  need[1] = TP_CHANNEL_FEATURE_CONTACTS;
   features[FEAT_READY].depends_on = need;
   features[FEAT_READY].prepare_async =
     tp_chat_prepare_ready_async;
@@ -1115,7 +1119,7 @@ empathy_tp_chat_get_id (EmpathyTpChat *self)
   g_return_val_if_fail (EMPATHY_IS_TP_CHAT (self), NULL);
 
   id = tp_channel_get_identifier ((TpChannel *) self);
-  if (!EMP_STR_EMPTY (id))
+  if (!TPAW_STR_EMPTY (id))
     return id;
   else if (self->priv->remote_contact)
     return empathy_contact_get_id (self->priv->remote_contact);