flarum-msteams-webhook/extend.php

26 lines
702 B
PHP

<?php
declare(strict_types=1);
use Flarum\Extend;
use SbpJm\FlarumMSTeamsWebhook\Console\TestTeamsUserCommand;
use SbpJm\FlarumMSTeamsWebhook\Listener\MirrorAlertsToTeams;
use SbpJm\FlarumMSTeamsWebhook\Notification\TeamsDriver;
return [
(new Extend\Locales(__DIR__ . '/locale')),
(new Extend\Frontend('admin'))
->js(__DIR__ . '/js/dist/admin.js'),
(new Extend\Console())
->command(TestTeamsUserCommand::class),
// ✅ EXISTING hook (unchanged)
(new Extend\Notification())
->beforeSending(MirrorAlertsToTeams::class),
// ✅ NEW: Microsoft Teams notification driver
(new Extend\Notification())
->driver('teams', TeamsDriver::class),
];