diff options
Diffstat (limited to 'slack/commands.py')
-rw-r--r-- | slack/commands.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/slack/commands.py b/slack/commands.py index 4fc3ce7..7638b0d 100644 --- a/slack/commands.py +++ b/slack/commands.py @@ -273,9 +273,9 @@ def command_slack_thread(buffer: str, args: List[str], options: Options): @weechat_command("-alsochannel|%(threads)", min_args=1) def command_slack_reply(buffer: str, args: List[str], options: Options): slack_buffer = shared.buffers.get(buffer) + broadcast = bool(options.get("alsochannel")) if isinstance(slack_buffer, SlackThread): - broadcast = bool(options.get("alsochannel")) - run_async(slack_buffer.post_message(args[0], broadcast)) + run_async(slack_buffer.post_message(args[0], broadcast=broadcast)) elif isinstance(slack_buffer, SlackConversation): split_args = args[0].split(" ", 1) if len(split_args) < 2: @@ -284,11 +284,7 @@ def command_slack_reply(buffer: str, args: List[str], options: Options): ) return thread_ts = slack_buffer.ts_from_hash_or_index(split_args[0]) - run_async( - slack_buffer.workspace.api.chat_post_message( - slack_buffer, split_args[1], thread_ts - ) - ) + run_async(slack_buffer.post_message(split_args[1], thread_ts, broadcast)) def print_uncaught_error(error: UncaughtError, detailed: bool, options: Options): |