summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-23 18:29:06 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2017-11-23 18:29:06 +0000
commit3bc33935d2af09f25b749068ee8a40f18c0b001d (patch)
tree4efc4f1a63ca8b923a2bc018ac4d0d96f731d086
parentd3023b438fc0811f777ed93219bdef662ba133bf (diff)
downloadpoezio-3bc33935d2af09f25b749068ee8a40f18c0b001d.tar.gz
poezio-3bc33935d2af09f25b749068ee8a40f18c0b001d.tar.bz2
poezio-3bc33935d2af09f25b749068ee8a40f18c0b001d.tar.xz
poezio-3bc33935d2af09f25b749068ee8a40f18c0b001d.zip
Include MUCs in /presence autocompletion.
Fixes #3347.
-rw-r--r--poezio/core/completions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/poezio/core/completions.py b/poezio/core/completions.py
index 5e7e510f..12f0b4a1 100644
--- a/poezio/core/completions.py
+++ b/poezio/core/completions.py
@@ -45,8 +45,13 @@ class CompletionCore:
"""
arg = the_input.get_argument_position()
if arg == 1:
+ to_suggest = []
+ for bookmark in self.core.bookmarks:
+ tab = self.core.get_tab_by_name(bookmark.jid, tabs.MucTab)
+ if tab is not None and tab.joined:
+ to_suggest.append(bookmark.jid)
return Completion(
- the_input.auto_completion, [jid for jid in roster.jids()],
+ the_input.auto_completion, roster.jids() + to_suggest,
'',
quotify=True)
elif arg == 2: