Closed rozetko closed 3 years ago
Slack doesn't support images uploading through webhooks, only with API. This PR adds new slack alert type which can send alerts to Slack with images
slack
Changes:
@slack/web-api
HASTIC_SLACK_API_TOKEN
HASTIC_SLACK_NOTIFICATION_CHANNEL
Buffer
loadImage
files.upload
Other changes:
makeNotification
generateNotification
Slack doesn't support images uploading through webhooks, only with API. This PR adds new
slack
alert type which can send alerts to Slack with imagesChanges:
@slack/web-api
depHASTIC_SLACK_API_TOKEN
: https://slack.com/intl/en-ru/help/articles/115005265703-Create-a-bot-for-your-workspaceHASTIC_SLACK_NOTIFICATION_CHANNEL
: name of channel to send alerts toslack
alert typeBuffer
instead of base64-string fromloadImage
so that we can use it withfiles.upload
Slack-API methodOther changes:
makeNotification
method togenerateNotification