fix(discord): only send notifications in production
Prevent Discord release notifications from being sent in non-production environments, avoiding accidental notifications during development and testing. Added unit tests to verify the behavior.
This commit is contained in:
@@ -31,6 +31,11 @@ class DiscordReleaseNotification implements ShouldQueue
|
||||
*/
|
||||
public function handle(): void
|
||||
{
|
||||
// Discord notifications must only ever be sent in production.
|
||||
if (! app()->isProduction()) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch ($this->messageType) {
|
||||
case 'release':
|
||||
DiscordAlert::message('<@&868457842250764289> (´• ω •`)ノ New **4k** Release! Check it out here: https://hstream.moe/hentai/'.$this->slug);
|
||||
|
||||
Reference in New Issue
Block a user