]> git.0d.be Git - empathy.git/blobdiff - src/empathy.c
empathy_dispatcher_join_muc: get an account instead of a connection
[empathy.git] / src / empathy.c
index aefb934eb8bc112a45e1f744147a29e299c6caa8..c1282808a3d5b84599d03005757b35faf1f09061 100644 (file)
@@ -298,13 +298,10 @@ account_status_changed_cb (TpAccount *account,
     GHashTable *details,
     EmpathyChatroom *room)
 {
-  TpConnection *conn;
-
-  conn = tp_account_get_connection (account);
-  if (conn == NULL)
+  if (new_status != TP_CONNECTION_STATUS_CONNECTED)
     return;
 
-  empathy_dispatcher_join_muc (conn,
+  empathy_dispatcher_join_muc (account,
       empathy_chatroom_get_room (room), EMPATHY_DISPATCHER_NON_USER_ACTION);
 }
 
@@ -352,7 +349,7 @@ account_manager_chatroom_ready_cb (GObject *source_object,
             }
           else
             {
-              empathy_dispatcher_join_muc (conn,
+              empathy_dispatcher_join_muc (account,
                   empathy_chatroom_get_room (room),
                   EMPATHY_DISPATCHER_NON_USER_ACTION);
             }