From b522ab658391e1831741ff05e8cd43947293b17e Mon Sep 17 00:00:00 2001
From: Jefry Lagrange <jefry.reyes@gmail.com>
Date: Thu, 30 Aug 2012 23:57:20 -0400
Subject: [PATCH] dont alert the user if we get a request for a file

---
 src/gui_interface.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/gui_interface.py b/src/gui_interface.py
index 5c6bc98098..58e5016ce8 100644
--- a/src/gui_interface.py
+++ b/src/gui_interface.py
@@ -912,15 +912,18 @@ class Interface:
                 account=account, keyID=keyID)
             gajim.contacts.add_contact(account, contact)
             self.roster.add_contact(obj.jid, account)
+        if obj.file_props.session_type == 'jingle':
+            request = obj.stanza.getTag('jingle').getTag('content')\
+                        .getTag('description').getTag('request')
+            if request:
+                # If we get a request instead 
+                return
         contact = gajim.contacts.get_first_contact_from_jid(account, obj.jid)
-
         if helpers.allow_popup_window(account):
             self.instances['file_transfers'].show_file_request(account, contact,
                 obj.file_props)
             return
-
         self.add_event(account, obj.jid, 'file-request', obj.file_props)
-
         if helpers.allow_showing_notification(account):
             path = gtkgui_helpers.get_icon_path('gajim-ft_request', 48)
             txt = _('%s wants to send you a file.') % gajim.get_name_from_jid(
-- 
GitLab