diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2018-11-05 00:50:47 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2018-11-05 00:51:54 +0100 |
commit | b423e60774a9511666186655b2878a3f56cd409c (patch) | |
tree | accd39e5a7fc989aa869bc49990ec964c0356e34 /wee_slack.py | |
parent | 04890f3a4b52243f880cd8728c1e95415a2cddf9 (diff) | |
download | wee-slack-b423e60774a9511666186655b2878a3f56cd409c.tar.gz |
Remove unnecessary print and returns
thread_command_callback is only bound to /thread and /reply, so it will
never be called with anything else, and there is no point in printing an
error message.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py index a38f9af..cd4a6f3 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3521,7 +3521,7 @@ def thread_command_callback(data, current_buffer, args): except: pm = channel.hashed_messages[thread_id] pm.open_thread(switch=config.switch_buffer_on_join) - return w.WEECHAT_RC_OK_EAT + elif args[0] == '/reply': if args[1][0] == "$": if args[1][1:] in channel.hashed_messages: @@ -3534,8 +3534,6 @@ def thread_command_callback(data, current_buffer, args): parent_id = str(next(islice(mkeys, count - 1, None))) msg = " ".join(args[2:]) channel.send_message(msg, request_dict_ext={"thread_ts": parent_id}) - return w.WEECHAT_RC_OK_EAT - w.prnt(current, "Invalid thread command.") return w.WEECHAT_RC_OK_EAT |