Skip to content

Commit

Permalink
Invite tagged user to channels on /leader-add (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewStanciu authored Apr 13, 2021
1 parent 5b7d872 commit 9a12127
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/interactions/leaderAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ const interactionLeaderAdd = async (bot, message) => {
Clubs: [...taggedUserClubs, recipientClub.id],
})

// invite leader to #leaders and their club channel
bot.api.conversations.invite({
token: bot.config.bot.access_token,
channel,
users: taggedUserID
})
bot.api.conversations.invite({
token: bot.config.bot.access_token,
channel: 'GAE0FFNFN',
users: taggedUserID
})

bot.replyPrivateDelayed(
message,
transcript('leaderAdd.success', { taggedUserID, channel })
Expand Down

0 comments on commit 9a12127

Please sign in to comment.