fix TB when we get a message from a not in roster contact

This commit is contained in:
Yann Leboulanger 2006-11-08 07:23:30 +00:00
parent bb072aafb8
commit 17d17ae50f
1 changed files with 2 additions and 2 deletions

View File

@ -2798,8 +2798,8 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
# If there is another resource, it may be a message from an invisible # If there is another resource, it may be a message from an invisible
# resource # resource
lcontact = gajim.contacts.get_contacts_from_jid(account, jid) lcontact = gajim.contacts.get_contacts_from_jid(account, jid)
if (len(lcontact) != 1 or lcontact[0].show != 'offline') and \ if (len(lcontact) > 1 or (lcontact and \
jid.find('@') > 0: lcontact[0].show != 'offline')) and jid.find('@') > 0:
contact = gajim.contacts.copy_contact(highest_contact) contact = gajim.contacts.copy_contact(highest_contact)
contact.resource = resource contact.resource = resource
contact.priority = 0 contact.priority = 0