mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-26 18:20:03 +00:00
feat(notification): add Pushover
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?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 || ! $pushoverSettings->pushover_token) {
|
||||
return;
|
||||
}
|
||||
|
||||
SendMessageToPushoverJob::dispatch($message, $pushoverSettings->pushover_token, $pushoverSettings->pushover_user);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user