Skip to content

Commit

Permalink
release 4.1.0.2 - hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksanderBak committed Dec 17, 2024
1 parent 9257ada commit 2727baf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions main/api/app/Controllers/AiChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public function sendMessage(Request $request, Response $response, array $args):
$newMessage = $this->addMessageToConversation($conversationId, $text, $authorId);

if ($newMessage) {
$newMessage['text'] = html_entity_decode($newMessage['text']);
$response->getBody()->write(json_encode($newMessage));
} else {
return $this->notFoundResponse($response);
Expand Down Expand Up @@ -191,10 +192,11 @@ public function updateMessage(Request $request, Response $response, array $args)
}

private function fetchConversations($get_newest_one = false) {
global $current_user;
$conversations = [];
$conversation_beans = $get_newest_one
? BeanFactory::getBean('ev_AiConversations')->get_full_list('date_entered DESC', '', '', 1)
: BeanFactory::getBean('ev_AiConversations')->get_full_list('date_entered DESC');
? BeanFactory::getBean('ev_AiConversations')->get_full_list('date_entered DESC', "user_id = '$current_user->id'", '', 1)
: BeanFactory::getBean('ev_AiConversations')->get_full_list('date_entered DESC', "user_id = '$current_user->id'");
foreach ($conversation_beans as $bean) {
if (empty($bean->id)) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion main/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'name' => 'MintHCM - AI Agent',
'published_date' => '2024-09-30 12:00:00',
'type' => 'module',
'version' => '4.1.0-1',
'version' => '4.1.0-2',
'remove_tables' => 'prompt'
);
$installdefs = array(
Expand Down

0 comments on commit 2727baf

Please sign in to comment.