diff --git a/extend.php b/extend.php index b2c6df2..bf30e3f 100644 --- a/extend.php +++ b/extend.php @@ -2,28 +2,22 @@ declare(strict_types=1); -namespace SbpJm\FlarumMSTeamsWebhook\Job; +use Flarum\Extend; +use SbpJm\FlarumMSTeamsWebhook\Console\TestTeamsUserCommand; +use SbpJm\FlarumMSTeamsWebhook\Notification\TeamsNotificationDriver; -use Flarum\Notification\Blueprint\BlueprintInterface; -use Flarum\User\User; -use Illuminate\Contracts\Queue\ShouldQueue; -use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Queue\SerializesModels; -use SbpJm\FlarumMSTeamsWebhook\Service\TeamsActivityNotifier; +return [ + new Extend\Locales(__DIR__ . '/locale'), -class SendTeamsActivityNotificationJob implements ShouldQueue -{ - use InteractsWithQueue; - use SerializesModels; + (new Extend\Frontend('admin')) + ->js(__DIR__ . '/js/dist/admin.js'), - public function __construct( - protected User $user, - protected BlueprintInterface $blueprint - ) { - } + (new Extend\Frontend('forum')) + ->js(__DIR__ . '/js/dist/forum.js'), - public function handle(TeamsActivityNotifier $notifier): void - { - $notifier->notify($this->user, $this->blueprint); - } -} \ No newline at end of file + (new Extend\Console()) + ->command(TestTeamsUserCommand::class), + + (new Extend\Notification()) + ->driver('teams', TeamsNotificationDriver::class, []), +]; \ No newline at end of file