Because I wanted to make the general-purpose #alerts channel on Slack only receive important production alerts, I needed a way to be able to choose which channel an alert goes to based on environment and severity.
In the process, I cleaned up the payload code a little bit and made ICON_EMOJI optional. Now you can upload a custom avatar for your webhook and it'll display as long as ICON_EMOJI isn't set.
Because I wanted to make the general-purpose
#alerts
channel on Slack only receive important production alerts, I needed a way to be able to choose which channel an alert goes to based on environment and severity.In the process, I cleaned up the payload code a little bit and made
ICON_EMOJI
optional. Now you can upload a custom avatar for your webhook and it'll display as long asICON_EMOJI
isn't set.