+static void
+get_contacts_cb (TpConnection *connection,
+ guint n_contacts,
+ TpContact * const *contacts,
+ const gchar * const *requested_ids,
+ GHashTable *failed_id_errors,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
+{
+ EmpathyContact *self = (EmpathyContact *) weak_object;
+ EmpathyContactPriv *priv = GET_PRIV (self);
+ TpContact *tp_contact;
+
+ if (n_contacts != 1)
+ return;
+
+ tp_contact = contacts[0];
+
+ g_return_if_fail (priv->tp_contact == NULL);
+ priv->tp_contact = g_object_ref (tp_contact);
+ g_object_notify (G_OBJECT (self), "tp-contact");
+
+ /* Update capabilities now that we have a TpContact */
+ set_capabilities_from_tp_caps (self,
+ tp_contact_get_capabilities (tp_contact));
+}
+