Merge branch 'hotfix/ticket' into feature/ticket0807

This commit is contained in:
2025-08-11 09:28:12 +08:00
+9
View File
@@ -44,6 +44,15 @@ class TicketService
if(!empty($attachment)){
(new AttachmentLogic())->adds($attachment, $result->id, $data['user_id']);
}
$cleanContent = trim(preg_replace('/\s+/', ' ', strip_tags($data['content'] ?? '')));
$conversation = [
'ticket_id' => $result->id,
'content' => $cleanContent,
'user_id' => $data['user_id'],
];
(new ConversationService())->add($conversation);
return $result;
} catch (\Throwable $e) {
Db::rollback();