appConfig->setValueString('core', $key, json_encode($settings[$key]), lazy: in_array($key, \OC\TaskProcessing\Manager::LAZY_CONFIG_KEYS, true)); if ($changed) { $this->eventDispatcher->dispatchTyped(new CriticalActionPerformedEvent( 'AI configuration was changed by user %s: %s was set to %s', [$this->userId, $key, json_encode($settings[$key])] )); } } return new DataResponse(); } }