Add notification filters

This commit is contained in:
2026-04-24 20:02:22 +00:00
parent 5f74ddd964
commit c54df44ebe
24 changed files with 1288 additions and 7 deletions
@@ -8,6 +8,10 @@ use Illuminate\Support\Arr;
class UpdateProjectNotificationAction
{
public function __construct(
private readonly NormalizeNotificationFilters $normalizeNotificationFilters,
) {}
/**
* @param array{
* channel?: mixed,
@@ -15,6 +19,7 @@ class UpdateProjectNotificationAction
* delivery_url?: string|null,
* enabled?: bool,
* event_type?: mixed,
* filters?: mixed,
* message_template?: string|null,
* name?: string
* } $validated
@@ -54,6 +59,12 @@ class UpdateProjectNotificationAction
);
}
if (array_key_exists('filters', $validated)) {
$attributes['filters'] = $this->normalizeNotificationFilters->handle(
Arr::get($validated, 'filters'),
);
}
$deliveryUrl = Arr::get($validated, 'delivery_url');
if (is_string($deliveryUrl) && trim($deliveryUrl) !== '') {