From 17d17ae50fc6e2e17430679e9b9c2eda093f1d3f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 8 Nov 2006 07:23:30 +0000 Subject: [PATCH] fix TB when we get a message from a not in roster contact --- src/roster_window.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index c9f454851..31d85f060 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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 # resource lcontact = gajim.contacts.get_contacts_from_jid(account, jid) - if (len(lcontact) != 1 or lcontact[0].show != 'offline') and \ - jid.find('@') > 0: + if (len(lcontact) > 1 or (lcontact and \ + lcontact[0].show != 'offline')) and jid.find('@') > 0: contact = gajim.contacts.copy_contact(highest_contact) contact.resource = resource contact.priority = 0