updated DiscordMessages for Database notifications

This commit is contained in:
Jakub Novák
2024-10-01 21:46:56 +02:00
parent cb5dc13bf1
commit 53a6e97ca3
3 changed files with 31 additions and 6 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Notifications\Database;
use App\Notifications\Channels\DiscordChannel;
use App\Notifications\Channels\TelegramChannel;
use App\Notifications\Dto\DiscordMessage;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Channels\MailChannel;
@@ -34,9 +35,13 @@ class DailyBackup extends Notification implements ShouldQueue
return $mail;
}
public function toDiscord(): string
public function toDiscord(): DiscordMessage
{
return 'Coolify: Daily backup statuses';
return new DiscordMessage(
title: 'Coolify: Daily backup statuses',
description: 'Nothing to report.',
color: DiscordMessage::infoColor(),
); // todo: is this necessary notification? what is the purpose of this notification?
}
public function toTelegram(): array