From 810fc88802d72b880ff9472be7374f72a34df748 Mon Sep 17 00:00:00 2001 From: Shaun McCance Date: Tue, 15 Sep 2009 12:47:09 -0500 Subject: Don't try to offer file transfers to MUCs --- src/empathy-chat-window.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/empathy-chat-window.c') diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index be29b3a8a..5b3a3ac0f 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -1416,6 +1416,14 @@ chat_window_drag_data_received (GtkWidget *widget, gchar *nl; gchar *uri; + priv = GET_PRIV (window); + contact = empathy_chat_get_remote_contact (priv->current_chat); + + if (!EMPATHY_IS_CONTACT (contact)) { + gtk_drag_finish (context, TRUE, FALSE, time); + return; + } + /* Only handle a single file for new. It would be wicked cool to be able to do multiple files, offering to zip them or whatever like nautilus-sendto does. Note that text/uri-list is defined to have @@ -1436,8 +1444,6 @@ chat_window_drag_data_received (GtkWidget *widget, file = g_file_new_for_uri (data); } - priv = GET_PRIV (window); - contact = empathy_chat_get_remote_contact (priv->current_chat); empathy_send_file (contact, file); g_object_unref (file); -- cgit v1.2.3