Fix broken opt-in notifications

This commit is contained in:
2022-02-11 00:51:16 +00:00
parent 025f69f622
commit 294c678283
157 changed files with 39 additions and 18 deletions

View File

@@ -22,19 +22,24 @@
namespace App\Traits;
use App\Facades\Options;
use Illuminate\Support\Facades\Log;
trait Cancellable
{
public function chooseChannelsViaOptions()
{
$channels = [];
// FIXME: This is not letting Slack and Email work at the same time
if (Options::getOption('enable_slack_notifications') == 1) {
array_push($channels, 'slack');
} elseif (Options::getOption('enable_email_notifications') == 1) {
array_push($channels, 'email');
array_push($channels, 'mail');
}
Log::debug('Cancellable: current channels list', [
'channels' => $channels
]);
return $channels;
}