summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-04 11:54:25 -0700
committerLance Stout <lancestout@gmail.com>2012-06-04 11:54:25 -0700
commitedf65f4f52679f8be4c94edaf952e18f3560d14d (patch)
tree0e82b483f98287f1fae9e696d82b23a5807d9ffe
parent98677fd602c61e239ec8852e40b288de977dc74e (diff)
downloadslixmpp-edf65f4f52679f8be4c94edaf952e18f3560d14d.tar.gz
slixmpp-edf65f4f52679f8be4c94edaf952e18f3560d14d.tar.bz2
slixmpp-edf65f4f52679f8be4c94edaf952e18f3560d14d.tar.xz
slixmpp-edf65f4f52679f8be4c94edaf952e18f3560d14d.zip
Include the default, unnamed group in self.client_roster.groups()
-rw-r--r--sleekxmpp/roster/single.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sleekxmpp/roster/single.py b/sleekxmpp/roster/single.py
index 518afebe..048b091e 100644
--- a/sleekxmpp/roster/single.py
+++ b/sleekxmpp/roster/single.py
@@ -119,7 +119,12 @@ class RosterNode(object):
"""Return a dictionary mapping group names to JIDs."""
result = {}
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:
result[group] = []
result[group].append(jid)