diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2024-03-09 13:08:11 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-03-29 00:00:15 +0100 |
commit | 1501895d66250679a7fe2a5bd67b368e96965401 (patch) | |
tree | 2c5342097dc987962c829a771530bc15746e0bd5 /slack/slack_workspace.py | |
parent | dcd1536137ec603a2c3db4c10c7688f73c0015b3 (diff) | |
download | wee-slack-1501895d66250679a7fe2a5bd67b368e96965401.tar.gz |
Use enterprise id in edgeapi path if it exists
It seems like for enterprise workspaces you have to use the enterprise
id (if the token is a workspace level token,
`enterprise_id/workspace_id` can also be used, but isn't necessary),
while for non-enterprise workspaces the workspace id should be used.
Diffstat (limited to 'slack/slack_workspace.py')
-rw-r--r-- | slack/slack_workspace.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py index faa0d73..99bd8aa 100644 --- a/slack/slack_workspace.py +++ b/slack/slack_workspace.py @@ -261,6 +261,7 @@ class SlackWorkspace: async def _connect_oauth(self) -> List[SlackConversation]: rtm_connect = await self.api.fetch_rtm_connect() self.id = rtm_connect["team"]["id"] + self.enterprise_id = rtm_connect["team"].get("enterprise_id") self.domain = rtm_connect["team"]["domain"] self.my_user = await self.users[rtm_connect["self"]["id"]] |