Include the default, unnamed group in self.client_roster.groups()
This commit is contained in:
parent
98677fd602
commit
edf65f4f52
1 changed files with 6 additions and 1 deletions
|
@ -119,7 +119,12 @@ class RosterNode(object):
|
||||||
"""Return a dictionary mapping group names to JIDs."""
|
"""Return a dictionary mapping group names to JIDs."""
|
||||||
result = {}
|
result = {}
|
||||||
for jid in self._jids:
|
for jid in self._jids:
|
||||||
for group in self._jids[jid]['groups']:
|
groups = self._jids[jid]['groups']
|
||||||
|
if not groups:
|
||||||
|
if '' not in result:
|
||||||
|
result[''] = []
|
||||||
|
result[''].append(jid)
|
||||||
|
for group in groups:
|
||||||
if group not in result:
|
if group not in result:
|
||||||
result[group] = []
|
result[group] = []
|
||||||
result[group].append(jid)
|
result[group].append(jid)
|
||||||
|
|
Loading…
Reference in a new issue