Skip to content

Commit

Permalink
fixed slack integration
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Jan 15, 2018
1 parent 9ca1f81 commit e927a2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function actionCreate()
if ($model->save()) {
// send slack message if enabled
if ($this->module->slackToken) {
$this->sendSlackMessage('#'.$model->identifier.' | '.$model->serverName.': '.$model->message, $this->module->slackChannel);
$this->sendSlackMessage('#'.$model->identifier.' | '.$model->getServerName().': '.$model->getErrorMessage(), $this->module->slackChannel);
}
// send error email if recipients are provided.
if (!empty($this->module->recipient)) {
Expand Down
5 changes: 5 additions & 0 deletions src/models/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public function attributeLabels()
* Get an array from error json.
*
* @return array
* @since 1.0.1
*/
public function getErrorArray()
{
Expand All @@ -100,6 +101,7 @@ public function getErrorArray()
*
* @param string $key
* @return boolean
* @since 1.0.1
*/
public function getErrorArrayKey($key)
{
Expand All @@ -110,6 +112,7 @@ public function getErrorArrayKey($key)
* Get error message from error array.
*
* @return boolean
* @since 1.0.1
*/
public function getErrorMessage()
{
Expand All @@ -119,6 +122,7 @@ public function getErrorMessage()
/**
* Get Server name from error array.
* @return boolean
* @since 1.0.1
*/
public function getServerName()
{
Expand All @@ -129,6 +133,7 @@ public function getServerName()
* Get new issue creation header.
*
* @return string
* @since 1.0.1
*/
public function getIssueLink($server)
{
Expand Down

0 comments on commit e927a2c

Please sign in to comment.