diff options
author | Tollef Fog Heen <tfheen@err.no> | 2015-10-26 21:58:52 +0100 |
---|---|---|
committer | Tollef Fog Heen <tfheen@err.no> | 2015-10-26 21:58:52 +0100 |
commit | 872a111784d9bf5e5977f604acfcace441598bad (patch) | |
tree | ff5dc84e5c1abc01c4645917761c16cbff1f5ce4 /wee_slack.py | |
parent | c2521f0e1538fd69d2c6d52801117a487abc2d04 (diff) | |
download | wee-slack-872a111784d9bf5e5977f604acfcace441598bad.tar.gz |
Identify ourselves in user-agent header again
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index c76bf5e..ee9b06e 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1713,8 +1713,9 @@ def async_slack_api_request(domain, token, request, post_data, priority=False): post_data["token"] = token url = 'url:https://{}/api/{}?{}'.format(domain, request, urllib.urlencode(post_data)) context = pickle.dumps({"request": request, "token": token, "post_data": post_data}) + params = { 'useragent': 'wee_slack {}'.format(SCRIPT_VERSION) } dbg("URL: {} context: {} params: {}".format(url, context, params) - w.hook_process(url, 20000, "url_processor_cb", context) + w.hook_process_hashtable(url, params, 20000, "url_processor_cb", context) # funny, right? big_data = {} |