correctly remove contacts (force = True when we re-add them after)

This commit is contained in:
Yann Leboulanger 2008-09-03 07:24:42 +00:00
parent ea7a97b1df
commit aba6fc2599
2 changed files with 4 additions and 4 deletions

View File

@ -1476,7 +1476,7 @@ class Interface:
not name and not groups: not name and not groups:
# contact removes us. # contact removes us.
if contacts: if contacts:
self.roster.remove_contact(jid, account, backend=True) self.roster.remove_contact(jid, account, force=True, backend=True)
return return
elif not contacts: elif not contacts:
if sub == 'remove': if sub == 'remove':
@ -1496,7 +1496,7 @@ class Interface:
old_groups = contacts[0].get_shown_groups() old_groups = contacts[0].get_shown_groups()
if contacts[0].sub != sub or contacts[0].ask != ask\ if contacts[0].sub != sub or contacts[0].ask != ask\
or old_groups != groups: or old_groups != groups:
self.roster.remove_contact(jid, account) self.roster.remove_contact(jid, account, force=True)
re_add = True re_add = True
for contact in contacts: for contact in contacts:
if not name: if not name:
@ -2737,7 +2737,7 @@ class Interface:
if session: if session:
ctrl = session.control ctrl = session.control
else: if not ctrl:
win = self.msg_win_mgr.get_window(fjid, account) win = self.msg_win_mgr.get_window(fjid, account)
if win: if win:

View File

@ -1870,7 +1870,7 @@ class RosterWindow:
_('If "%s" accepts this request you will know his or her status.' _('If "%s" accepts this request you will know his or her status.'
) % jid) ) % jid)
return return
self.remove_contact(contact.jid, account) self.remove_contact(contact.jid, account, force=True)
contact.groups = groups contact.groups = groups
if nickname: if nickname:
contact.name = nickname contact.name = nickname