changeset eea8dc540ea5 in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=eea8dc540ea5 description: [bluec0re] Fix bug when server assign a contact to a group with empty name. Fixes #7865
diffstat:
src/common/contacts.py | 2 +- src/roster_window.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diffs (24 lines):
diff -r 840876e759b4 -r eea8dc540ea5 src/common/contacts.py --- a/src/common/contacts.py Sun Oct 26 16:37:11 2014 +0100 +++ b/src/common/contacts.py Sun Oct 26 16:43:44 2014 +0100 @@ -103,7 +103,7 @@ our_chatstate, chatstate, client_caps=client_caps)
self.contact_name = '' # nick choosen by contact - self.groups = [i for i in set(groups)] # filter duplicate values + self.groups = [i if i else _('General') for i in set(groups)] # filter duplicate values
self.sub = sub self.ask = ask diff -r 840876e759b4 -r eea8dc540ea5 src/roster_window.py --- a/src/roster_window.py Sun Oct 26 16:37:11 2014 +0100 +++ b/src/roster_window.py Sun Oct 26 16:43:44 2014 +0100 @@ -313,7 +313,7 @@ delimiter = gajim.connections[account].nested_group_delimiter group_splited = group.split(delimiter) parent_group = delimiter.join(group_splited[:-1]) - if parent_group in self._iters[account_group]['groups']: + if len(group_splited) > 1 and parent_group in self._iters[account_group]['groups']: iter_parent = self._iters[account_group]['groups'][parent_group] elif parent_group: iter_parent = self._add_group_iter(account, parent_group)