remove contact from roster when we read his awaiting events and showOffline is False. Fixes #1812
This commit is contained in:
parent
397d255c42
commit
a2b3acd864
|
@ -1451,7 +1451,7 @@ class ChatControl(ChatControlBase):
|
||||||
if (self.contact.show == 'offline' or self.contact.show == 'error'):
|
if (self.contact.show == 'offline' or self.contact.show == 'error'):
|
||||||
showOffline = gajim.config.get('showoffline')
|
showOffline = gajim.config.get('showoffline')
|
||||||
if not showOffline and typ == 'chat' and \
|
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,
|
gajim.interface.roster.really_remove_contact(self.contact,
|
||||||
self.account)
|
self.account)
|
||||||
elif typ == 'pm':
|
elif typ == 'pm':
|
||||||
|
|
|
@ -369,9 +369,8 @@ class Interface:
|
||||||
if contact1.jid in gajim.newly_added[account]:
|
if contact1.jid in gajim.newly_added[account]:
|
||||||
gajim.newly_added[account].remove(contact1.jid)
|
gajim.newly_added[account].remove(contact1.jid)
|
||||||
self.roster.draw_contact(contact1.jid, account)
|
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,
|
||||||
gobject.timeout_add(5000, self.roster.really_remove_contact,
|
contact1, account)
|
||||||
contact1, account)
|
|
||||||
contact1.show = array[1]
|
contact1.show = array[1]
|
||||||
contact1.status = status_message
|
contact1.status = status_message
|
||||||
contact1.priority = priority
|
contact1.priority = priority
|
||||||
|
@ -395,7 +394,8 @@ class Interface:
|
||||||
# reset chatstate if needed:
|
# reset chatstate if needed:
|
||||||
# (when contact signs out or has errors)
|
# (when contact signs out or has errors)
|
||||||
if array[1] in ('offline', 'error'):
|
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)
|
gajim.connections[account].remove_transfers_for_contact(contact1)
|
||||||
self.roster.chg_contact_status(contact1, array[1], status_message,
|
self.roster.chg_contact_status(contact1, array[1], status_message,
|
||||||
account)
|
account)
|
||||||
|
|
Loading…
Reference in New Issue