From 2ebfd360ce1c56b94c8d0c87af279a706b4c59bb Mon Sep 17 00:00:00 2001 From: Julien Veyssier Date: Thu, 19 Feb 2026 10:23:19 +0100 Subject: [PATCH] only get the tasks of the current user when checking message/title generation tasks Signed-off-by: Julien Veyssier --- lib/Controller/ChattyLLMController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {