Fix Discord webhook URLs
This commit is contained in:
parent
cb38f2ad90
commit
9e080d544a
@ -24,6 +24,7 @@ use Illuminate\Support\Collection;
|
||||
* @property Collection subfleets
|
||||
* @property int days
|
||||
* @property int distance
|
||||
* @property int planned_distance
|
||||
* @property int flight_time
|
||||
* @property string route
|
||||
* @property string dpt_time
|
||||
|
@ -31,7 +31,8 @@ class NewsAdded extends Notification implements ShouldQueue
|
||||
public function toDiscordChannel($news): ?DiscordMessage
|
||||
{
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->success()
|
||||
return $dm->url(setting('notifications.discord_public_webhook_url'))
|
||||
->success()
|
||||
->title('News: '.$news->subject)
|
||||
->author([
|
||||
'name' => $news->user->ident.' - '.$news->user->name_private,
|
||||
|
@ -64,7 +64,8 @@ class PirepFiled extends Notification implements ShouldQueue
|
||||
}
|
||||
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->success()
|
||||
return $dm->url(setting('notifications.discord_public_webhook_url'))
|
||||
->success()
|
||||
->title($title)
|
||||
->description($pirep->user->discord_id ? 'Flight by <@'.$pirep->user->discord_id.'>' : '')
|
||||
->url(route('frontend.pireps.show', [$pirep->id]))
|
||||
|
@ -110,7 +110,8 @@ class PirepStatusChanged extends Notification implements ShouldQueue
|
||||
}
|
||||
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->success()
|
||||
return $dm->url(setting('notifications.discord_public_webhook_url'))
|
||||
->success()
|
||||
->title($title)
|
||||
->description($pirep->user->discord_id ? 'Flight by <@'.$pirep->user->discord_id.'>' : '')
|
||||
->url(route('frontend.pireps.show', [$pirep->id]))
|
||||
|
@ -49,7 +49,8 @@ class UserRegistered extends Notification implements ShouldQueue
|
||||
public function toDiscordChannel($notifiable): ?DiscordMessage
|
||||
{
|
||||
$dm = new DiscordMessage();
|
||||
return $dm->success()
|
||||
return $dm->url(setting('notifications.discord_private_webhook_url'))
|
||||
->success()
|
||||
->title('New User Registered: '.$this->user->ident)
|
||||
->author([
|
||||
'name' => $this->user->ident.' - '.$this->user->name_private,
|
||||
|
Loading…
Reference in New Issue
Block a user