laravel/slack-notification-channel

slack warning message

Opened this issue · 1 comments

I am using laravel version 5.8. What is the proper way to send a warning message to slack? The following code does not generate a warning message...

public function toSlack($notifiable)
    {
        return (new SlackMessage)
            ->content('One of your invoices has been paid!')
            ->warning();
    }

I don't believe that Slack messages themselves actually use the color setting. Only Slack attachments use it: https://api.slack.com/docs/message-attachments

If you change your content to be in an attachment instead, it should show up with the colored bar on the left like you're probably expecting. Attachments can have their own color set specifically, otherwise they will use the color set on the message.