dont alert the user if we get a request for a file
This commit is contained in:
parent
c64bac1535
commit
b522ab6583
|
@ -912,15 +912,18 @@ class Interface:
|
||||||
account=account, keyID=keyID)
|
account=account, keyID=keyID)
|
||||||
gajim.contacts.add_contact(account, contact)
|
gajim.contacts.add_contact(account, contact)
|
||||||
self.roster.add_contact(obj.jid, account)
|
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)
|
contact = gajim.contacts.get_first_contact_from_jid(account, obj.jid)
|
||||||
|
|
||||||
if helpers.allow_popup_window(account):
|
if helpers.allow_popup_window(account):
|
||||||
self.instances['file_transfers'].show_file_request(account, contact,
|
self.instances['file_transfers'].show_file_request(account, contact,
|
||||||
obj.file_props)
|
obj.file_props)
|
||||||
return
|
return
|
||||||
|
|
||||||
self.add_event(account, obj.jid, 'file-request', obj.file_props)
|
self.add_event(account, obj.jid, 'file-request', obj.file_props)
|
||||||
|
|
||||||
if helpers.allow_showing_notification(account):
|
if helpers.allow_showing_notification(account):
|
||||||
path = gtkgui_helpers.get_icon_path('gajim-ft_request', 48)
|
path = gtkgui_helpers.get_icon_path('gajim-ft_request', 48)
|
||||||
txt = _('%s wants to send you a file.') % gajim.get_name_from_jid(
|
txt = _('%s wants to send you a file.') % gajim.get_name_from_jid(
|
||||||
|
|
Loading…
Reference in New Issue