]> git.0d.be Git - empathy.git/blobdiff - src/empathy-event-manager.c
Merge branch 'debug-window'
[empathy.git] / src / empathy-event-manager.c
index a80aad2362006883e4bccef8e522b0291a63aa3a..1be3ff7ce1cc19a2a889c67008bc1e58e7cd7dea 100644 (file)
@@ -25,6 +25,7 @@
 #include <glib/gi18n.h>
 
 #include <telepathy-glib/util.h>
+#include <telepathy-glib/interfaces.h>
 
 #include <libempathy/empathy-account-manager.h>
 #include <libempathy/empathy-dispatcher.h>
@@ -914,19 +915,12 @@ event_manager_presence_changed_cb (EmpathyContactMonitor *monitor,
     TpConnectionPresenceType previous,
     EmpathyEventManager *manager)
 {
-  McAccount *account;
-  gboolean just_connected;
-  EmpathyAccountManager *account_manager;
+  EmpathyAccount *account;
   gchar *header = NULL;
   gboolean preference = FALSE;
 
   account = empathy_contact_get_account (contact);
-  account_manager = empathy_account_manager_dup_singleton ();
-  just_connected = empathy_account_manager_is_account_just_connected (
-                  account_manager, account);
-
-  g_object_unref (account_manager);
-  if (just_connected)
+  if (empathy_account_is_just_connected (account))
     return;
 
   if (tp_connection_presence_type_cmp_availability (previous,