Skip to content

Commit

Permalink
Merge pull request #1922 from daostack/bugfix/old-messages-displaying
Browse files Browse the repository at this point in the history
fix chat message parsing to use parseStringToTextEditorValue
  • Loading branch information
andreymikhadyuk authored Aug 4, 2023
2 parents 03f737e + 24f75e0 commit 4f82ac1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/components/Chat/ChatMessage/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
FilePreviewVariant,
countTextEditorEmojiElements,
getFileName,
parseStringToTextEditorValue,
} from "@/shared/ui-kit";
import { ChatImageGallery } from "@/shared/ui-kit";
import { StaticLinkType, isRTL } from "@/shared/utils";
Expand Down Expand Up @@ -133,7 +134,7 @@ export default function ChatMessage({
}

const emojiCount = countTextEditorEmojiElements(
JSON.parse(discussionMessage.text),
parseStringToTextEditorValue(discussionMessage.text),
);
const parsedText = await getTextFromTextEditorString({
textEditorString: discussionMessage.text,
Expand Down

0 comments on commit 4f82ac1

Please sign in to comment.