From 5e15386879c296d3a0b9c86a265b0c92bb3d7262 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 22 Jan 2012 18:44:46 +0100 Subject: [PATCH] ability to send file to contacts without a resource (but still not to fake jid) Fixes #7077 --- src/chat_control.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 51c54a234..8d60be4a3 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1723,18 +1723,19 @@ class ChatControl(ChatControlBase): self._video_button.set_sensitive(self.video_available) # Send file - if self.contact.supports(NS_FILE) and self.contact.resource: + if self.contact.supports(NS_FILE) and (self.type_id == 'chat' or \ + self.gc_contact.resource): self._send_file_button.set_sensitive(True) self._send_file_button.set_tooltip_text('') else: self._send_file_button.set_sensitive(False) if not self.contact.supports(NS_FILE): self._send_file_button.set_tooltip_text(_( - "This contact does not support file transfer.")) + "This contact does not support file transfer.")) else: self._send_file_button.set_tooltip_text( - _("You need to know the real JID of the contact to send him or " - "her a file.")) + _("You need to know the real JID of the contact to send " + "him or her a file.")) # Convert to GC if self.contact.supports(NS_MUC):