Skip to content
Snippets Groups Projects
Commit 5ec5886c authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent having twice the same group for a contact. Fixes #5504

parent b82ea5fe
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment