fix logic. Fixes #1798
This commit is contained in:
parent
5e46d05431
commit
0828f88e29
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue