Skip to content

Commit 036a814

Browse files
committed
prevent approval notifications from being sent
1 parent 7ad11a6 commit 036a814

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/Notifications/FursuitApprovedNotification.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ public function __construct(public Fursuit $fursuit)
1818

1919
public function via($notifiable): array
2020
{
21+
// Do not send notification if badge was created in a previous year
22+
if ($this->badge && $this->badge->created_at && $this->badge->created_at->year < now()->year) {
23+
return [];
24+
}
2125
return ['mail'];
2226
}
2327

0 commit comments

Comments
 (0)