diff --git a/lib/Controller/ChattyLLMController.php b/lib/Controller/ChattyLLMController.php index 3de4b83d..e996cb0e 100644 --- a/lib/Controller/ChattyLLMController.php +++ b/lib/Controller/ChattyLLMController.php @@ -738,7 +738,7 @@ public function checkMessageGenerationTask(int $taskId, int $sessionId): JSONRes } try { - $task = $this->taskProcessingManager->getTask($taskId); + $task = $this->taskProcessingManager->getUserTask($taskId, $this->userId); } catch (NotFoundException $e) { return new JSONResponse(['error' => 'task_not_found'], Http::STATUS_NOT_FOUND); } catch (\OCP\TaskProcessing\Exception\Exception $e) { @@ -938,7 +938,7 @@ public function checkTitleGenerationTask(int $taskId, int $sessionId): JSONRespo } try { - $task = $this->taskProcessingManager->getTask($taskId); + $task = $this->taskProcessingManager->getUserTask($taskId, $this->userId); } catch (NotFoundException $e) { return new JSONResponse(['error' => 'task_not_found'], Http::STATUS_NOT_FOUND); } catch (\OCP\TaskProcessing\Exception\Exception $e) {