aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-06-12 00:54:25 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-08-25 19:45:18 +0200
commitbe1eb4c4d2f4cfe830deea216c8d99e805e59523 (patch)
treeacac6a1dfede99a838e6f22e7c7d051d26863f9c /wee_slack.py
parent60d422aec30aea8e5fcd982aa6c934890a6ef252 (diff)
downloadwee-slack-be1eb4c4d2f4cfe830deea216c8d99e805e59523.tar.gz
Complete all nicks on the team for some commands
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 129e4a7..b473149 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -991,7 +991,13 @@ def nick_completion_cb(data, completion_item, current_buffer, completion):
if current_channel is None or current_channel.members is None:
return w.WEECHAT_RC_OK
- for member in current_channel.members:
+ base_command = w.hook_completion_get_string(completion, "base_command")
+ if base_command in ['invite', 'msg', 'query', 'whois']:
+ members = current_channel.team.members
+ else:
+ members = current_channel.members
+
+ for member in members:
user = current_channel.team.users.get(member)
if user and not user.deleted:
w.hook_completion_list_add(completion, "@" + user.name, 1, w.WEECHAT_LIST_POS_SORT)