aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-11-06 20:13:39 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2019-01-26 12:51:07 +0100
commit46f62c5410e4cce3dd261b0d1cb49ace4bed5f27 (patch)
tree203ad42f587a75245a15163943cf1c2c097266c2 /wee_slack.py
parent826254a3ea01c57ccca2b9bf87866289280be4bf (diff)
downloadwee-slack-46f62c5410e4cce3dd261b0d1cb49ace4bed5f27.tar.gz
Rename register command callback
When the command starts with command_, it will be listed in the help and callable with /slack. This is just a callback function, so it should not be callable directly by the user.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 23c9982..e463e16 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3366,10 +3366,11 @@ def command_register(data, current_buffer, args):
).format(CLIENT_ID, CLIENT_SECRET, oauth_code)
params = {'useragent': 'wee_slack {}'.format(SCRIPT_VERSION)}
w.hook_process_hashtable('url:', params, config.slack_timeout, "", "")
- w.hook_process_hashtable("url:{}".format(uri), params, config.slack_timeout, "command_register_callback", "")
+ w.hook_process_hashtable("url:{}".format(uri), params, config.slack_timeout, "register_callback", "")
+
@utf8_decode
-def command_register_callback(data, command, return_code, out, err):
+def register_callback(data, command, return_code, out, err):
if return_code != 0:
w.prnt("", "ERROR: problem when trying to get Slack OAuth token. Got return code {}. Err: ".format(return_code, err))
w.prnt("", "Check the network or proxy settings")