"Setting value for '$key' must be JSON-compatible"], Http::STATUS_BAD_REQUEST); } } foreach ($keys as $key) { if (!isset($settings[$key])) { continue; } $changed = $this->appConfig->setValueString('core', $key, $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, $settings[$key]] )); } } return new DataResponse(); } }