diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-19 09:48:59 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-19 09:50:54 +0200 |
commit | c303a77c5420f2f97306802953d57a9587ba5fd6 (patch) | |
tree | 60c82b973f1ac14d9caee9c6dc842c9bec9d30d8 | |
parent | 10719274e261df62828e184b360883e541ed57d6 (diff) | |
download | wee-slack-c303a77c5420f2f97306802953d57a9587ba5fd6.tar.gz |
Include cookie when making the websocket connection
Slack began to require this for xoxc tokens today.
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index cd890e6..84c437f 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1777,9 +1777,11 @@ class SlackTeam(object): # only http proxy is currently supported proxy = ProxyWrapper() timeout = config.slack_timeout / 1000 + cookie = SlackRequest(self.team, "").options()["cookie"] if proxy.has_proxy: ws = create_connection( self.ws_url, + cookie=cookie, timeout=timeout, sslopt=sslopt_ca_certs, http_proxy_host=proxy.proxy_address, @@ -1788,7 +1790,10 @@ class SlackTeam(object): ) else: ws = create_connection( - self.ws_url, timeout=timeout, sslopt=sslopt_ca_certs + self.ws_url, + cookie=cookie, + timeout=timeout, + sslopt=sslopt_ca_certs, ) self.hook = w.hook_fd( |