From e75134317321a485a993237f1240981929b910a7 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 31 Jan 2006 08:22:32 +0000 Subject: [PATCH] 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 --- src/roster_window.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/roster_window.py b/src/roster_window.py index cb099fb94..59d450dd7 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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)