From ede483b1c5fc5ed2b04b668b57980e7a9bbab1ad Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sat, 24 Aug 2019 18:42:57 +0200 Subject: Include @channel, @everyone and @here in usergroup completion @group isn't mentioned in the documentation[0], and is changed to @channel if you try to complete it in the web client, so it probably shouldn't be used anymore. [0]: https://get.slack.help/hc/en-us/articles/202009646-Notify-a-channel-or-workspace --- wee_slack.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 8c68e90..984c3b4 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1060,8 +1060,9 @@ def usergroups_completion_cb(data, completion_item, current_buffer, completion): if current_channel is None: return w.WEECHAT_RC_OK - for subteam in current_channel.team.subteams.values(): - w.hook_completion_list_add(completion, subteam.handle, 1, w.WEECHAT_LIST_POS_SORT) + subteam_handles = [subteam.handle for subteam in current_channel.team.subteams.values()] + for group in subteam_handles + ["@channel", "@everyone", "@here"]: + w.hook_completion_list_add(completion, group, 1, w.WEECHAT_LIST_POS_SORT) return w.WEECHAT_RC_OK -- cgit