29 lines
782 B
PHP
29 lines
782 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Flarum\Extend;
|
|
use SbpJm\FlarumMSTeamsWebhook\Console\TestTeamsUserCommand;
|
|
use SbpJm\FlarumMSTeamsWebhook\Listener\MirrorAlertsToTeams;
|
|
use SbpJm\FlarumMSTeamsWebhook\Notification\TeamsChannel;
|
|
|
|
return [
|
|
// Localization
|
|
(new Extend\Locales(__DIR__ . '/locale')),
|
|
|
|
// Admin frontend (settings UI)
|
|
(new Extend\Frontend('admin'))
|
|
->js(__DIR__ . '/js/dist/admin.js'),
|
|
|
|
// CLI test command
|
|
(new Extend\Console())
|
|
->command(TestTeamsUserCommand::class),
|
|
|
|
// Existing hook (leave it intact)
|
|
(new Extend\Notification())
|
|
->beforeSending(MirrorAlertsToTeams::class),
|
|
|
|
// ✅ NEW: Microsoft Teams notification channel
|
|
(new Extend\Notification())
|
|
->addChannel(TeamsChannel::class),
|
|
]; |