completly remove a contact before adding it when we do DND because add_contact_ro_roster doesn't add it if one row is already in roster

This commit is contained in:
Yann Leboulanger 2006-01-31 08:22:32 +00:00
parent 568fa9e694
commit e751343173
1 changed files with 4 additions and 0 deletions

View File

@ -2701,6 +2701,10 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
del gajim.groups[account][grp_source]
if not grp_dest in c_source.groups:
c_source.groups.append(grp_dest)
# Remove all rows because add_contact_ro_roster doesn't add it if one
# is already in roster
for i in self.get_contact_iter(jid_source, account):
model.remove(i)
self.add_contact_to_roster(jid_source, account)
gajim.connections[account].update_contact(jid_source, c_source.name,
c_source.groups)