howdyai / botkit

Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.
MIT License
11.44k stars 2.28k forks source link

Add support for slack enterprise id #2133

Open elisherer opened 3 years ago

elisherer commented 3 years ago

Inside activity and for fetching token and bot user by it, addresses #1962

By @reesesm2000

If a bot is installed in an Enterprise Grid, it can be accessed from any of the teams in the grid. When the bot is installed, it only gets to know about the first team where the install is done therefore causing a team not found error when accessed from a separate team in the grid. Making the changes below allow for automatically adding the team id if it belongs to an already registered grid not needed the app to be reinstalled.

I followed the changes he suggested, but I changed the arguments of getTokenForTeam and getBotUserByTeam to include the entire activity (in addition) instead of just the additional enterprise id to support custom future token logic.

ghost commented 3 years ago

CLA assistant check
All CLA requirements met.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.