aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy-gtk/empathy-location-manager.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-location-manager.c b/libempathy-gtk/empathy-location-manager.c
index de772c7e3..987574b45 100644
--- a/libempathy-gtk/empathy-location-manager.c
+++ b/libempathy-gtk/empathy-location-manager.c
@@ -39,7 +39,7 @@
#include "libempathy/empathy-account-manager.h"
#include "libempathy/empathy-enum-types.h"
#include "libempathy/empathy-location.h"
-#include "libempathy/empathy-contact-factory.h"
+#include "libempathy/empathy-tp-contact-factory.h"
#include "libempathy/empathy-utils.h"
#define DEBUG_FLAG EMPATHY_DEBUG_LOCATION
@@ -116,10 +116,14 @@ publish_location (EmpathyLocationManager *location_manager,
guint connection_status = -1;
gboolean can_publish;
EmpathyConf *conf = empathy_conf_get ();
- EmpathyContactFactory *factory = empathy_contact_factory_dup_singleton ();
+ TpConnection *conn;
+ EmpathyTpContactFactory *factory;
priv = GET_PRIV (location_manager);
+ conn = mission_control_get_tpconnection (priv->mc, account, NULL);
+ factory = empathy_tp_contact_factory_dup_singleton (conn);
+
if (force_publication == FALSE)
{
if (!empathy_conf_get_bool (conf, EMPATHY_PREFS_LOCATION_PUBLISH,
@@ -139,7 +143,8 @@ publish_location (EmpathyLocationManager *location_manager,
DEBUG ("Publishing location to account %s",
mc_account_get_display_name (account));
- empathy_contact_factory_set_location (factory, account, priv->location);
+ empathy_tp_contact_factory_set_location (factory, priv->location);
+ g_object_unref (factory);
}
static void