extend verändert

This commit is contained in:
JM 2026-05-06 16:22:25 +02:00
parent 06a4711c8f
commit ea1e02bba6
1 changed files with 15 additions and 21 deletions

View File

@ -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);
}
}
(new Extend\Console())
->command(TestTeamsUserCommand::class),
(new Extend\Notification())
->driver('teams', TeamsNotificationDriver::class, []),
];