fix logic. Fixes #1798

This commit is contained in:
Yann Leboulanger 2006-04-04 19:32:12 +00:00
parent 5e46d05431
commit 0828f88e29
1 changed files with 3 additions and 1 deletions

View File

@ -144,7 +144,9 @@ class Contacts:
contacts = self._contacts[account][contact.jid] contacts = self._contacts[account][contact.jid]
# We had only one that was offline, remove it # We had only one that was offline, remove it
if len(contacts) == 1 and contacts[0].show == 'offline': if len(contacts) == 1 and contacts[0].show == 'offline':
self.remove_contact(account, contacts[0]) # Do not use self.remove_contact: it deteles
# self._contacts[account][contact.jid]
contacts.remove(contacts[0])
# If same JID with same resource already exists, use the new one # If same JID with same resource already exists, use the new one
for c in contacts: for c in contacts:
if c.resource == contact.resource: if c.resource == contact.resource: