Commit a2b3acd8 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

remove contact from roster when we read his awaiting events and showOffline is False. Fixes #1812

parent 397d255c
......@@ -1451,7 +1451,7 @@ class ChatControl(ChatControlBase):
if (self.contact.show == 'offline' or self.contact.show == 'error'):
showOffline = gajim.config.get('showoffline')
if not showOffline and typ == 'chat' and \
len(gajim.contacts.get_contact(self.account, jid)) == 1:
len(gajim.contacts.get_contact(self.account, jid)) < 2:
gajim.interface.roster.really_remove_contact(self.contact,
self.account)
elif typ == 'pm':
......
......@@ -369,9 +369,8 @@ class Interface:
if contact1.jid in gajim.newly_added[account]:
gajim.newly_added[account].remove(contact1.jid)
self.roster.draw_contact(contact1.jid, account)
if not gajim.awaiting_events[account].has_key(jid):
gobject.timeout_add(5000, self.roster.really_remove_contact,
contact1, account)
gobject.timeout_add(5000, self.roster.really_remove_contact,
contact1, account)
contact1.show = array[1]
contact1.status = status_message
contact1.priority = priority
......@@ -395,7 +394,8 @@ class Interface:
# reset chatstate if needed:
# (when contact signs out or has errors)
if array[1] in ('offline', 'error'):
contact1.our_chatstate = contact1.chatstate = contact1.composing_jep = None
contact1.our_chatstate = contact1.chatstate = \
contact1.composing_jep = None
gajim.connections[account].remove_transfers_for_contact(contact1)
self.roster.chg_contact_status(contact1, array[1], status_message,
account)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment