RSM-38 Added Discord Routing for relevant notifications

This commit is contained in:
2020-10-10 00:39:53 +01:00
parent 2a43e213f9
commit 82123b1c26
9 changed files with 90 additions and 16 deletions

View File

@@ -9,6 +9,8 @@ use App\Facades\Options;
trait Cancellable
{
// This method is only used if you want this default set of channels;
// Other channels can always be configured by overloading the channels method here.
public function chooseChannelsViaOptions()
{
$channels = [];
@@ -17,11 +19,17 @@ trait Cancellable
{
array_push($channels, 'slack');
}
elseif(Options::getOption('enable_email_notifications') == 1)
if (Options::getOption('enable_email_notifications') == 1)
{
array_push($channels, 'email');
}
if (Options::getOption('enable_discord_notifications'))
{
array_push($channels, 'discord');
}
return $channels;
}