aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-11-07 00:19:46 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2018-11-07 00:19:46 +0100
commitff36ee82b8cb0fc6c6ac7294fcac0a5a487572d6 (patch)
tree3d20c8970e024c087c8546b45aa6b8d12f3a4f33 /wee_slack.py
parent5070f4368fe5722ab72319ccc969b83de25047c0 (diff)
downloadwee-slack-ff36ee82b8cb0fc6c6ac7294fcac0a5a487572d6.tar.gz
Allow more than one word in /reply message
Fixes a bug introduced two commits ago, in commit fd4ddd9.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 90b0d8c..85b9469 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3534,7 +3534,7 @@ def thread_command_callback(data, current_buffer, args):
@utf8_decode
def reply_command_callback(data, current_buffer, args):
channel = EVENTROUTER.weechat_controller.buffers[current_buffer]
- args = args.split()
+ args = args.split(None, 2)
if len(args) != 3:
w.prnt('', 'Usage: /reply <count/id> <message>')
return w.WEECHAT_RC_OK_EAT
@@ -3549,8 +3549,7 @@ def reply_command_callback(data, current_buffer, args):
w.prnt('', 'ERROR: Invalid id given, must be a number greater than 0 or an existing id')
return w.WEECHAT_RC_OK_EAT
- text = ' '.join(args[2:])
- channel.send_message(text, request_dict_ext={'thread_ts': parent_id})
+ channel.send_message(args[2], request_dict_ext={'thread_ts': parent_id})
return w.WEECHAT_RC_OK_EAT