From 133e63497cfe26decbd3ae2dd3760e1debdff28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Duli=C3=A7i?= Date: Fri, 12 Mar 2021 21:45:19 +0300 Subject: [PATCH] fixed slack #1927 --- app/Notifications/Install/UpdateFailed.php | 2 +- config/update.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Notifications/Install/UpdateFailed.php b/app/Notifications/Install/UpdateFailed.php index a8ca79ca8..5f5ff2061 100644 --- a/app/Notifications/Install/UpdateFailed.php +++ b/app/Notifications/Install/UpdateFailed.php @@ -95,7 +95,7 @@ class UpdateFailed extends Notification return (new SlackMessage) ->error() ->from($this->notifications['slack']['from'], $this->notifications['slack']['emoji']) - ->to($this->notifications['slack']['to']) + ->to($this->notifications['slack']['channel']) ->content($message) ->attachment(function ($attachment) { $attachment->fields([ diff --git a/config/update.php b/config/update.php index 55604b10b..219536494 100644 --- a/config/update.php +++ b/config/update.php @@ -15,7 +15,8 @@ return [ 'enabled' => env('UPDATE_NOTIFICATIONS_SLACK_ENABLED', false), 'emoji' => env('UPDATE_NOTIFICATIONS_SLACK_EMOJI', ':warning:'), 'from' => env('UPDATE_NOTIFICATIONS_SLACK_FROM', 'Akaunting Update'), - 'to' => env('UPDATE_NOTIFICATIONS_SLACK_TO', '#my-channel'), + 'to' => env('UPDATE_NOTIFICATIONS_SLACK_TO'), // webhook url + 'channel' => env('UPDATE_NOTIFICATIONS_SLACK_CHANNEL', null), // set null to use the default channel of webhook ], ],