Add ability to overrload SlackBotChannel::class with a local implementation.
This commit is contained in:
parent
e864d46430
commit
7ee2df607c
@ -40,10 +40,11 @@ class SlackServiceProvider extends ServiceProvider
|
||||
|
||||
$this->loadRoutesFrom(realpath(__DIR__ .'/../routes.php'));
|
||||
|
||||
Notification::resolved(function (ChannelManager $service) {
|
||||
$service->extend('slackapp', function ($app) {
|
||||
return new SlackBotChannel($app->make(API::class));
|
||||
if (config('slack.register_notification'))
|
||||
Notification::resolved(function (ChannelManager $service) {
|
||||
$service->extend('slackapp',function($app) {
|
||||
return new SlackBotChannel($app->make(API::class));
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
@ -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),
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user