From 5ec5886c57da6d4409c7d96f8fb384367e5197a5 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 15 Dec 2009 19:04:35 +0100 Subject: [PATCH] prevent having twice the same group for a contact. Fixes #5504 --- src/common/xmpp/roster_nb.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/xmpp/roster_nb.py b/src/common/xmpp/roster_nb.py index bf5600cb7..f343c8341 100644 --- a/src/common/xmpp/roster_nb.py +++ b/src/common/xmpp/roster_nb.py @@ -95,7 +95,9 @@ class NonBlockingRoster(PlugIn): self._data[jid]['subscription']=item.getAttr('subscription') self._data[jid]['groups']=[] if not self._data[jid].has_key('resources'): self._data[jid]['resources']={} - for group in item.getTags('group'): self._data[jid]['groups'].append(group.getData()) + for group in item.getTags('group'): + if group.getData() not in self._data[jid]['groups']: + self._data[jid]['groups'].append(group.getData()) self._data[self._owner.User+'@'+self._owner.Server]={'resources':{},'name':None,'ask':None,'subscription':None,'groups':None,} self.set=1 # Looks like we have a workaround