drone-plugins / drone-slack

Drone plugin for sending Slack notifications
http://plugins.drone.io/drone-plugins/drone-slack
Apache License 2.0
62 stars 80 forks source link

Recipient Setting Does Not Work With Display Name #167

Open theory opened 11 months ago

theory commented 11 months ago

The Slack plugin works fine when I specify a channel, but I get a 404 when I specify my slack username via the recipient setting. Is this a known issue? From Slack’s docs, it looks like prepending @ may not be necessary. But maybe it’d be better to add a channelID setting to the plugin, and then one can specify a channel ID (e.g., C123456) or a personal ID (e.g., D05MQH3Q2DP)?

theory commented 11 months ago

Originally posted pin the Harness Slack, after following the comment to open an issue yesterday and following the link to discourse, which redirected to Harness.

theory commented 11 months ago

Turns out that I had the wrong username. My company set my username to david.wheeler, but I changed my display name to theory years ago. Nowhere in my profile does it say david.wheeler at all that I can see, yet when I used recipient: david.wheeler, it actually worked! Completely wild.

I do think that having an option to use IDs would be less ambiguous, however, and allow for things like name changes (channels or people) not to break message delivery.