Add ability to overrload SlackBotChannel::class with a local implementation.

This commit is contained in:
Deon George 2021-12-01 14:33:42 +11:00
parent e864d46430
commit 7ee2df607c
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
2 changed files with 6 additions and 4 deletions

View File

@ -40,8 +40,9 @@ class SlackServiceProvider extends ServiceProvider
$this->loadRoutesFrom(realpath(__DIR__ .'/../routes.php'));
if (config('slack.register_notification'))
Notification::resolved(function (ChannelManager $service) {
$service->extend('slackapp', function ($app) {
$service->extend('slackapp',function($app) {
return new SlackBotChannel($app->make(API::class));
});
});

View File

@ -5,4 +5,5 @@ return [
'client_id' => env('SLACK_CLIENT_ID',NULL),
'client_secret' => env('SLACK_CLIENT_SECRET',NULL),
'signing_secret' => env('SLACK_SIGNING_SECRET',NULL),
'register_notification' => env('SLACK_REGISTER_NOTIFICATION',TRUE),
];