feat: add discord notifications

This commit is contained in:
Andras Bacsai committed 2023-09-06 14:31:38 +02:00
1 parent df1b9e7319
commit f9a2ff6d90
21 files changed
+419 -123

No files matched your search

@@ -3,6 +3,7 @@
namespace App\Notifications\Internal;
use App\Notifications\Channels\DiscordChannel;
use App\Notifications\Channels\TelegramChannel;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
@@ -17,11 +18,17 @@ class GeneralNotification extends Notification implements ShouldQueue
public function via(object $notifiable): array
{
return [DiscordChannel::class];
return [TelegramChannel::class, DiscordChannel::class];
}
public function toDiscord(): string
{
return $this->message;
}
public function toTelegram(): array
{
return [
"message" => $this->message,
];
}
}