don't prompt to negotiate if we have mutual subscription

This commit is contained in:
Brendan Taylor 2007-07-17 08:26:14 +00:00
parent fdef1c3d72
commit 8adbac7997
1 changed files with 5 additions and 3 deletions

View File

@ -1745,8 +1745,10 @@ class Interface:
self.dialog.destroy() self.dialog.destroy()
return return
contact = gajim.contacts.get_contact_with_highest_priority(account, str(jid)) contact = gajim.contacts.get_contact(account, jid.getStripped(), jid.getResource())
# FIXME: shouldn't prompt if i don't have a subscription for remote but
# he has one for me. get_contact() returns None in this case?
if gajim.SHOW_LIST[gajim.connections[account].connected] == 'invisible' or not contact or\ if gajim.SHOW_LIST[gajim.connections[account].connected] == 'invisible' or not contact or\
contact.sub not in ('from', 'both'): contact.sub not in ('from', 'both'):
self.dialog = dialogs.YesNoDialog(_('Start session?'), self.dialog = dialogs.YesNoDialog(_('Start session?'),