diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2024-01-06 16:32:14 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | af2c56f96d8be2f783332f5e4c502e8d15835b32 (patch) | |
tree | 66a7620e5ef5a288f0f17e0cb9473a2188cbce79 /slack/slack_workspace.py | |
parent | 30e500d4067a161a3e6ea3161ff3440b6959d263 (diff) | |
download | wee-slack-af2c56f96d8be2f783332f5e4c502e8d15835b32.tar.gz |
URL encode cookies if not encoded
The cookies need to be encoded for the Slack API to accept them, so this
makes it work if the config is set with cookies that are not encoded.
Diffstat (limited to 'slack/slack_workspace.py')
-rw-r--r-- | slack/slack_workspace.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py index 9348e1a..c0652fb 100644 --- a/slack/slack_workspace.py +++ b/slack/slack_workspace.py @@ -42,7 +42,7 @@ from slack.slack_message import SlackMessage, SlackTs from slack.slack_thread import SlackThread from slack.slack_user import SlackBot, SlackUser, SlackUsergroup from slack.task import Future, Task, create_task, gather, run_async -from slack.util import get_callback_name +from slack.util import get_callback_name, get_cookies if TYPE_CHECKING: from slack_api.slack_bots_info import SlackBotInfo @@ -382,7 +382,7 @@ class SlackWorkspace: self._ws = create_connection( url, self.config.network_timeout.value, - cookie=self.config.api_cookies.value, + cookie=get_cookies(self.config.api_cookies.value), proxy_type=proxy.type, http_proxy_host=proxy.address, http_proxy_port=proxy.port, |