You are here

protected function SlackSendMessage::doExecute in Slack 8

Send message to slack.

Parameters

string $message: The message to be sent.

string $channel: The slack channel.

string $username: The slack username.

Throws

\GuzzleHttp\Exception\GuzzleException

File

src/Plugin/RulesAction/SlackSendMessage.php, line 89

Class

SlackSendMessage
Provides a 'Slack send message' action.

Namespace

Drupal\slack\Plugin\RulesAction

Code

protected function doExecute($message, $channel = '', $username = '') {
  $this->slackService
    ->sendMessage($message, $channel, $username);
}