diff --git a/lib/Service/AiIntegrations/AiIntegrationsService.php b/lib/Service/AiIntegrations/AiIntegrationsService.php index b888f433f8..8c7759bf9a 100644 --- a/lib/Service/AiIntegrations/AiIntegrationsService.php +++ b/lib/Service/AiIntegrations/AiIntegrationsService.php @@ -179,7 +179,7 @@ public function getSmartReply(Account $account, Mailbox $mailbox, Message $messa throw new ServiceException('Text processing is not available in your current Nextcloud version', 0, $e); } if (in_array(FreePromptTaskType::class, $manager->getAvailableTaskTypes(), true)) { - $cachedReplies = $this->cache->getValue('smartReplies_'.$message->getUid()); + $cachedReplies = $this->cache->getValue('smartReplies_'.$message->getId()); if ($cachedReplies) { return json_decode($cachedReplies, true); } @@ -216,7 +216,7 @@ public function getSmartReply(Account $account, Mailbox $mailbox, Message $messa $task = new Task(FreePromptTaskType::class, $prompt, 'mail,', $currentUserId); $manager->runTask($task); $replies = $task->getOutput(); - $this->cache->addValue('smartReplies_'.$message->getUid(), $replies); + $this->cache->addValue('smartReplies_'.$message->getId(), $replies); return json_decode($replies, true); } else {