diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-09-18 13:06:39 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2022-09-18 16:36:55 +0200 |
commit | 9c5a4b1bc92a35df53fef6e0e3620e3db50ea734 (patch) | |
tree | eae335927cce5c20f71d04f9febfa9d8f8110a28 /wee_slack.py | |
parent | f205c37dc9e43e7c159a5d36a1b11b78365492ea (diff) | |
download | wee-slack-9c5a4b1bc92a35df53fef6e0e3620e3db50ea734.tar.gz |
Support including the d-s cookie
According to one comment it was necessary for them to include this
cookie as well.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 3e80089..e0df044 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1453,7 +1453,11 @@ class SlackRequest(object): if ":" in self.token: token, cookie = self.token.split(":", 1) self.token = token - self.cookies["d"] = cookie + if cookie.startswith("d="): + for name, value in [c.split("=") for c in cookie.split(";")]: + self.cookies[name] = value + else: + self.cookies["d"] = cookie self.callback = callback self.domain = "api.slack.com" self.reset() |