config->get('useWebSocket')) { return; } if (!$entity->isNew()) { return; } $userId = $entity->get('userId'); if (!$userId) { return; } $this->webSocketSubmission->submit('newNotification', $userId); } }