mirror of
https://github.com/flarum/core.git
synced 2025-07-30 21:20:24 +02:00
Use a notification driver with the new channel extender (#28)
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
|
||||
use Flarum\Api\Event\Serializing;
|
||||
use Flarum\Extend;
|
||||
use Flarum\Notification\Event\Sending;
|
||||
use Flarum\Post\Event\Posted;
|
||||
use Flarum\Pusher\Api\Controller\AuthController;
|
||||
use Flarum\Pusher\Listener;
|
||||
use Flarum\Pusher\PusherNotificationDriver;
|
||||
use Flarum\Settings\SettingsRepositoryInterface;
|
||||
use Illuminate\Contracts\Container\Container;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
@@ -30,6 +30,9 @@ return [
|
||||
|
||||
new Extend\Locales(__DIR__.'/locale'),
|
||||
|
||||
(new Extend\Notification())
|
||||
->driver('pusher', PusherNotificationDriver::class),
|
||||
|
||||
function (Dispatcher $events, Container $container) {
|
||||
$container->bind(Pusher::class, function ($app) {
|
||||
$settings = $app->make(SettingsRepositoryInterface::class);
|
||||
@@ -49,7 +52,6 @@ return [
|
||||
});
|
||||
|
||||
$events->listen(Posted::class, Listener\PushNewPost::class);
|
||||
$events->listen(Sending::class, Listener\PushNotification::class);
|
||||
$events->listen(Serializing::class, Listener\AddPusherApi::class);
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user