summaryrefslogtreecommitdiff
path: root/src/tabs
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-11 01:25:00 +0200
committermathieui <mathieui@mathieui.net>2014-04-11 01:25:00 +0200
commit04aa6c89145dfc8aaa5c2e418e01419af9471726 (patch)
treef05dffc641237c4cb9e96d83c703c52ee96b3e1e /src/tabs
parent0847643b548d1f5014c1af56a86c0e6c2d7ce92f (diff)
downloadpoezio-04aa6c89145dfc8aaa5c2e418e01419af9471726.tar.gz
poezio-04aa6c89145dfc8aaa5c2e418e01419af9471726.tar.bz2
poezio-04aa6c89145dfc8aaa5c2e418e01419af9471726.tar.xz
poezio-04aa6c89145dfc8aaa5c2e418e01419af9471726.zip
Fix #2428 (complete fulljids on /version in MUCs)
also clean up some newlines mess
Diffstat (limited to 'src/tabs')
-rw-r--r--src/tabs/muctab.py7
1 files changed, 6 insertions, 1 deletions
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"""