fix: general notifications does not go through email channel

This commit is contained in:
Andras Bacsai
2024-12-11 11:09:53 +01:00
parent 6a7b283844
commit c915bf9c0f

View File

@@ -75,6 +75,10 @@ trait HasNotificationSettings
'slack' => SlackChannel::class, 'slack' => SlackChannel::class,
]; ];
if ($event === 'general') {
unset($channelMap['email']);
}
foreach ($channelMap as $channel => $channelClass) { foreach ($channelMap as $channel => $channelClass) {
if ($this->isNotificationEnabled($channel) && $this->isNotificationTypeEnabled($channel, $event)) { if ($this->isNotificationEnabled($channel) && $this->isNotificationTypeEnabled($channel, $event)) {
$channels[] = $channelClass; $channels[] = $channelClass;