* Discord notifications for events #433 * Style fixes * Check for blank webhook urls and disable * Cleanup items after review * Changes and fixes * Style fixes * Don't load env for testing * Fix status text * Refactor saving fields/fares so events get the latest data * Cleanup * Style fixes
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
|
||||
namespace App\Contracts;
|
||||
|
||||
use App\Notifications\Channels\Discord\DiscordMessage;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class Notification extends \Illuminate\Notifications\Notification implements ShouldQueue
|
||||
{
|
||||
@@ -17,14 +17,14 @@ class Notification extends \Illuminate\Notifications\Notification implements Sho
|
||||
{
|
||||
// Look in the notifications.channels config and see where this particular
|
||||
// notification can go. Map it to $channels
|
||||
$klass = static::class;
|
||||
/*$klass = static::class;
|
||||
$notif_config = config('notifications.channels', []);
|
||||
if (!array_key_exists($klass, $notif_config)) {
|
||||
Log::error('Notification type '.$klass.' missing from notifications config, defaulting to mail');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->channels = $notif_config[$klass];
|
||||
$this->channels = $notif_config[$klass];*/
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,8 +34,16 @@ class Notification extends \Illuminate\Notifications\Notification implements Sho
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function via($notifiable)
|
||||
/*public function via($notifiable)
|
||||
{
|
||||
return $this->channels;
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @return DiscordMessage|null
|
||||
*/
|
||||
public function toDiscordChannel($notifiable): ?DiscordMessage
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user