From e927a2cb4f495a3e1783c8eca129de2a4fddf7fd Mon Sep 17 00:00:00 2001 From: Basil Suter Date: Mon, 15 Jan 2018 16:25:46 +0100 Subject: [PATCH] fixed slack integration --- src/controllers/DefaultController.php | 2 +- src/models/Data.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/DefaultController.php b/src/controllers/DefaultController.php index 0773314..2760ee4 100644 --- a/src/controllers/DefaultController.php +++ b/src/controllers/DefaultController.php @@ -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)) { diff --git a/src/models/Data.php b/src/models/Data.php index 9d638e1..cadfec4 100644 --- a/src/models/Data.php +++ b/src/models/Data.php @@ -85,6 +85,7 @@ public function attributeLabels() * Get an array from error json. * * @return array + * @since 1.0.1 */ public function getErrorArray() { @@ -100,6 +101,7 @@ public function getErrorArray() * * @param string $key * @return boolean + * @since 1.0.1 */ public function getErrorArrayKey($key) { @@ -110,6 +112,7 @@ public function getErrorArrayKey($key) * Get error message from error array. * * @return boolean + * @since 1.0.1 */ public function getErrorMessage() { @@ -119,6 +122,7 @@ public function getErrorMessage() /** * Get Server name from error array. * @return boolean + * @since 1.0.1 */ public function getServerName() { @@ -129,6 +133,7 @@ public function getServerName() * Get new issue creation header. * * @return string + * @since 1.0.1 */ public function getIssueLink($server) {