From 502069903381ecb83e1da81a34b832dc27989469 Mon Sep 17 00:00:00 2001 From: Darren Clarke Date: Thu, 17 Oct 2024 21:25:12 +0200 Subject: [PATCH] Fix for plain text messages displayed as HTML --- .../(main)/tickets/[id]/@detail/_components/TicketDetail.tsx | 2 ++ apps/link/app/_graphql/getTicketArticlesQuery.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx b/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx index d24d34a..bee6548 100644 --- a/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx +++ b/apps/link/app/(main)/tickets/[id]/@detail/_components/TicketDetail.tsx @@ -109,6 +109,8 @@ export const TicketDetail: FC = ({ id }) => { } model={{ message: article.bodyWithUrls, + type: + article.contentType === "text/html" ? "html" : "text", sentTime: article.updated_at, sender: article.from, direction: diff --git a/apps/link/app/_graphql/getTicketArticlesQuery.ts b/apps/link/app/_graphql/getTicketArticlesQuery.ts index c652135..6ef86fd 100644 --- a/apps/link/app/_graphql/getTicketArticlesQuery.ts +++ b/apps/link/app/_graphql/getTicketArticlesQuery.ts @@ -1,4 +1,4 @@ -import { gql } from 'graphql-request'; +import { gql } from "graphql-request"; export const getTicketArticlesQuery = gql` query getTicketArticles($ticketId: ID!) { @@ -7,6 +7,7 @@ query getTicketArticles($ticketId: ID!) { node { id bodyWithUrls + contentType internal type { name