From 04aa6c89145dfc8aaa5c2e418e01419af9471726 Mon Sep 17 00:00:00 2001 From: mathieui Date: Fri, 11 Apr 2014 01:25:00 +0200 Subject: Fix #2428 (complete fulljids on /version in MUCs) also clean up some newlines mess --- src/tabs/muctab.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/tabs') diff --git a/src/tabs/muctab.py b/src/tabs/muctab.py index 8953d075..4cd18f03 100644 --- a/src/tabs/muctab.py +++ b/src/tabs/muctab.py @@ -16,6 +16,7 @@ import curses import os import random from datetime import datetime +from functools import reduce from . import ChatTab, Tab @@ -206,7 +207,11 @@ class MucTab(ChatTab): compare_users = lambda x: x.last_talked userlist = [user.nick for user in sorted(self.users, key=compare_users, reverse=True)\ if user.nick != self.own_nick] - return the_input.auto_completion(userlist, quotify=False) + comp = sorted(reduce(lambda x, y: x + [i.jid for i in y], + (roster[jid].resources for jid in roster.jids() if len(roster[jid])), + [])) + userlist.extend(comp) + return the_input.new_completion(userlist, 1, quotify=False) def completion_info(self, the_input): """Completion for /info""" -- cgit v1.2.3