aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_workspace.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-01-19 23:05:25 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commitd2bb9263f0062275b92024ccdba68d5439521b5d (patch)
treedd9b46727d5a3fc8e1b1c232419504772305e928 /slack/slack_workspace.py
parentd6b4f505d53e69ecb39d518a89d8d0013e22ad51 (diff)
downloadwee-slack-d2bb9263f0062275b92024ccdba68d5439521b5d.tar.gz
Add support for completing nicks
This uses Slacks edgeapi which only works for session tokens, but has the benefit of being able to complete nicks without all users being loaded. So need to add some completion for the loaded users for when using OAuth tokens as well.
Diffstat (limited to 'slack/slack_workspace.py')
-rw-r--r--slack/slack_workspace.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/slack/slack_workspace.py b/slack/slack_workspace.py
index 96740ec..e900101 100644
--- a/slack/slack_workspace.py
+++ b/slack/slack_workspace.py
@@ -114,6 +114,7 @@ class SlackWorkspace:
async def connect(self):
rtm_connect = await self.api.fetch_rtm_connect()
self.id = rtm_connect["team"]["id"]
+ self.enterprise_id = rtm_connect["team"].get("enterprise_id")
self.my_user = await self.users[rtm_connect["self"]["id"]]
await self.connect_ws(rtm_connect["url"])