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'));
|
$this->loadRoutesFrom(realpath(__DIR__ .'/../routes.php'));
|
||||||
|
|
||||||
Notification::resolved(function (ChannelManager $service) {
|
if (config('slack.register_notification'))
|
||||||
$service->extend('slackapp', function ($app) {
|
Notification::resolved(function (ChannelManager $service) {
|
||||||
return new SlackBotChannel($app->make(API::class));
|
$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_id' => env('SLACK_CLIENT_ID',NULL),
|
||||||
'client_secret' => env('SLACK_CLIENT_SECRET',NULL),
|
'client_secret' => env('SLACK_CLIENT_SECRET',NULL),
|
||||||
'signing_secret' => env('SLACK_SIGNING_SECRET',NULL),
|
'signing_secret' => env('SLACK_SIGNING_SECRET',NULL),
|
||||||
|
'register_notification' => env('SLACK_REGISTER_NOTIFICATION',TRUE),
|
||||||
];
|
];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user