flarum-msteams-webhook/extend.php

29 lines
721 B
PHP

<?php
declare(strict_types=1);
namespace SbpJm\FlarumMSTeamsWebhook\Job;
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;
class SendTeamsActivityNotificationJob implements ShouldQueue
{
use InteractsWithQueue;
use SerializesModels;
public function __construct(
protected User $user,
protected BlueprintInterface $blueprint
) {
}
public function handle(TeamsActivityNotifier $notifier): void
{
$notifier->notify($this->user, $this->blueprint);
}
}