diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-08-24 18:42:57 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-08-25 19:42:06 +0200 |
commit | ede483b1c5fc5ed2b04b668b57980e7a9bbab1ad (patch) | |
tree | c77cf74a6872998dc9c69af9f031453ae5fe55c8 /wee_slack.py | |
parent | 97ea3ae638ced4908bdd259e8d2c3c6996f0b1e9 (diff) | |
download | wee-slack-ede483b1c5fc5ed2b04b668b57980e7a9bbab1ad.tar.gz |
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
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 5 |
1 files changed, 3 insertions, 2 deletions
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 |