updated DiscordMessages for Internal&ScheduledTask notifications
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Notifications\Internal;
|
||||
|
||||
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\Notification;
|
||||
@@ -32,9 +33,13 @@ class GeneralNotification extends Notification implements ShouldQueue
|
||||
return $channels;
|
||||
}
|
||||
|
||||
public function toDiscord(): string
|
||||
public function toDiscord(): DiscordMessage
|
||||
{
|
||||
return $this->message;
|
||||
return new DiscordMessage(
|
||||
title: 'Coolify: General Notification',
|
||||
description: $this->message,
|
||||
color: DiscordMessage::infoColor(),
|
||||
);
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
|
||||
Reference in New Issue
Block a user