aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-02-13 20:49:01 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2020-02-23 18:55:07 +0100
commit96f430e20865dc2cb5437863743d3c5a6e7f8f85 (patch)
treeb7d6f3ad9e419908a63ae1c5ed53b37fa6202131 /wee_slack.py
parent3280e1a188875d4e769497f6f14ab674c5feb2d6 (diff)
downloadwee-slack-96f430e20865dc2cb5437863743d3c5a6e7f8f85.tar.gz
Print error if trying to use /thread in team buffer
Fixes #737
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index d6934d3..3f34682 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3977,6 +3977,10 @@ def command_thread(data, current_buffer, args):
"""
channel = EVENTROUTER.weechat_controller.buffers[current_buffer]
+ if not isinstance(channel, SlackChannelCommon):
+ print_error('/thread can not be used in the team buffer, only in a channel')
+ return w.WEECHAT_RC_ERROR
+
if args:
msg = get_msg_from_id(channel, args)
if not msg: