aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-manager.c6
-rw-r--r--src/empathy-chat-window.c10
2 files changed, 7 insertions, 9 deletions
diff --git a/src/empathy-chat-manager.c b/src/empathy-chat-manager.c
index 0a16be90d..a3177a3f7 100644
--- a/src/empathy-chat-manager.c
+++ b/src/empathy-chat-manager.c
@@ -21,6 +21,7 @@
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-dispatcher.h>
+#include <libempathy/empathy-utils.h>
#include "empathy-chat-window.h"
@@ -385,13 +386,16 @@ connection_ready_cb (TpConnection *connection,
priv = GET_PRIV (self);
+ /* FIXME: Once empathy_dispatcher_join_muc will take a TpAccount instead of
+ * a TpConnection we won't have to prepare the connection any more. */
if (error == NULL)
{
if (data->room)
empathy_dispatcher_join_muc (connection, data->id,
EMPATHY_DISPATCHER_NON_USER_ACTION);
else
- empathy_dispatcher_chat_with_contact_id (connection, data->id,
+ empathy_dispatcher_chat_with_contact_id (
+ empathy_get_account_for_connection (connection), data->id,
EMPATHY_DISPATCHER_NON_USER_ACTION);
g_signal_emit (self, signals[CHATS_CHANGED], 0,
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 93c1ab773..27d6dd874 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1738,14 +1738,8 @@ chat_window_drag_data_received (GtkWidget *widget,
}
if (!chat) {
- TpConnection *connection;
-
- connection = tp_account_get_connection (account);
-
- if (connection) {
- empathy_dispatcher_chat_with_contact_id (
- connection, contact_id, gtk_get_current_event_time ());
- }
+ empathy_dispatcher_chat_with_contact_id (
+ account, contact_id, gtk_get_current_event_time ());
g_strfreev (strv);
return;