You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
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.
botworker.js
Add after line 112
// @ts-ignore this field is required for slack
enterprise: this.getConfig('activity').conversation.enterprise
Add after line 153 (new line 153)
// @ts-ignore this field is required for slack
enterprise: this.getConfig('activity').conversation.enterprise
Add after line 190
// @ts-ignore this field is required for slack
enterprise: this.getConfig('activity').conversation.enterprise
slack_adapter.js
Change line 193 to
const token = yield this.options.getTokenForTeam(activity.conversation.team, activity.conversation.enterprise);
Change line 221 to
const user_id = yield this.options.getBotUserByTeam(activity.conversation.team, activity.conversation.enterprise);
Add after line 526
enterprise: event.team.enterprise_id
Add after line 617
activity.channelData.enterprise = event.enterprise_id;
Add after line 621
activity.conversation.enterprise = activity.channelData.enterprise;
Add after line 670
activity.channelData.enterprise = event.enterprise_id;
Add after line 674
activity.conversation.enterprise = activity.channelData.enterprise;
The text was updated successfully, but these errors were encountered:
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.
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.
botworker.js
Add after line 112
// @ts-ignore this field is required for slack
enterprise: this.getConfig('activity').conversation.enterprise
Add after line 153 (new line 153)
// @ts-ignore this field is required for slack
enterprise: this.getConfig('activity').conversation.enterprise
Add after line 190
// @ts-ignore this field is required for slack
enterprise: this.getConfig('activity').conversation.enterprise
slack_adapter.js
Change line 193 to
const token = yield this.options.getTokenForTeam(activity.conversation.team, activity.conversation.enterprise);
Change line 221 to
const user_id = yield this.options.getBotUserByTeam(activity.conversation.team, activity.conversation.enterprise);
Add after line 526
enterprise: event.team.enterprise_id
Add after line 617
activity.channelData.enterprise = event.enterprise_id;
Add after line 621
activity.conversation.enterprise = activity.channelData.enterprise;
Add after line 670
activity.channelData.enterprise = event.enterprise_id;
Add after line 674
activity.conversation.enterprise = activity.channelData.enterprise;
The text was updated successfully, but these errors were encountered: