mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-15 09:12:32 -04:00
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: rosslh <ross@rosshill.ca>
22 lines
772 B
PHP
22 lines
772 B
PHP
<?php
|
|
|
|
namespace App\Notifications\Channels;
|
|
|
|
use App\Jobs\SendMessageToPushoverJob;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class PushoverChannel
|
|
{
|
|
public function send(SendsPushover $notifiable, Notification $notification): void
|
|
{
|
|
$message = $notification->toPushover();
|
|
$pushoverSettings = $notifiable->pushoverNotificationSettings;
|
|
|
|
if (! $pushoverSettings || ! $pushoverSettings->isEnabled() || ! $pushoverSettings->pushover_user_key || ! $pushoverSettings->pushover_api_token) {
|
|
return;
|
|
}
|
|
|
|
SendMessageToPushoverJob::dispatch($message, $pushoverSettings->pushover_api_token, $pushoverSettings->pushover_user_key, data_get($notification, 'isTestNotification', false) ? null : $pushoverSettings);
|
|
}
|
|
}
|