public function MessageNotifierSlack::deliver in Slack 7
Deliver a message via the required transport method.
Parameters
$output: Array keyed by the view mode, and the rendered entity in the specified view mode.
Return value
TRUE or FALSE based on delivery status.
Overrides MessageNotifierBase::deliver
File
- plugins/
notifier/ slack/ MessageNotifierSlack.class.php, line 10 - Slack notifier.
Class
- MessageNotifierSlack
- @file Slack notifier.
Code
public function deliver(array $output = array()) {
if (!($webhook_url = slack_get_default_webhook_url())) {
drupal_set_message('Message cannot be sent if Webhook URL is not configured in Slack module settings.', 'error');
}
return slack_send_message($webhook_url, strip_tags($output['message_notify_slack_body']));
}