action))->send(); } public function shouldQueue(ObjectActionCreate $event): bool { $actionObjectType = ActionObjectType::tryFrom($event->action->object_type); $objectAction = ObjectAction::tryFrom($event->action->action); if (! $actionObjectType || !$objectAction) { return false; } return in_array($objectAction->value, $event->notificationSetting[$actionObjectType->value]['email'] ?? []); } }