codebuddies / greetbot

Slackbot for greeting new codebuddies users
MIT License
9 stars 14 forks source link

`/welcome test [@<username>][#<channel name>]` Triggers Excess Messages #36

Closed BethanyG closed 6 years ago

BethanyG commented 6 years ago

Definitely an issue with the switch() statement in /routes/endpoints/slash/welcome/welcome.js

If a user types /welcome test #channel name @username, the bot should send one message to the channel, and one message as a DM to the user. Instead, two messages are sent to the channel, and two to the user. Not clear on why this is happening, or what the correct syntax is for sending two (but not 4) messages out. This doesn't happen unless both parameters are supplied.

BethanyG commented 6 years ago

Suspect this is due to a missing break; in the switch statement. Assigning it to myself for fixing.