From 3bc33935d2af09f25b749068ee8a40f18c0b001d Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 23 Nov 2017 18:29:06 +0000 Subject: Include MUCs in /presence autocompletion. Fixes #3347. --- poezio/core/completions.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'poezio') 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: -- cgit v1.2.3