- MissionControl *mc;
- TpConnectionStatus status;
- McProfile *profile;
- const gchar *protocol_name;
-
- mc = empathy_mission_control_new ();
- status = mission_control_get_connection_status (mc, account, NULL);
- g_object_unref (mc);
- if (status != TP_CONNECTION_STATUS_CONNECTED) {
- /* Account is disconnected */
+ EmpathyAccountManager *account_manager;
+ EmpathyContactManager *contact_manager;
+ TpConnection *connection;
+ gboolean result;
+
+ account_manager = empathy_account_manager_dup_singleton ();
+ connection = empathy_account_manager_get_connection (account_manager,
+ account);
+ if (!connection) {
+ g_object_unref (account_manager);