From 304f15096ecea3e77eaafc1cdbfe5f99e8d87289 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 d359312a..d4d483bb 100644 --- a/lib/Controller/ChattyLLMController.php +++ b/lib/Controller/ChattyLLMController.php @@ -691,7 +691,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) { @@ -896,7 +896,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) {