From a9d59e4d08c9c0cd5cba350f3ab41ce2875ed408 Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Tue, 25 Jun 2024 10:34:44 +0200 Subject: [PATCH] Repeated "[ExpensiMark] Missing account name" errors --- src/libs/ReportActionsUtils.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 16032d41b949e..9f3662360275d 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1,4 +1,4 @@ -import {ExpensiMark, fastMerge} from 'expensify-common'; +import {fastMerge} from 'expensify-common'; import _ from 'lodash'; import lodashFindLast from 'lodash/findLast'; import type {OnyxCollection, OnyxCollectionInputValue, OnyxEntry, OnyxUpdate} from 'react-native-onyx'; @@ -21,6 +21,7 @@ import isReportMessageAttachment from './isReportMessageAttachment'; import * as Localize from './Localize'; import Log from './Log'; import type {MessageElementBase, MessageTextElement} from './MessageElement'; +import {parseHtmlToText} from './OnyxAwareParser'; import * as PersonalDetailsUtils from './PersonalDetailsUtils'; import type {OptimisticIOUReportAction, PartialReportAction} from './ReportUtils'; import StringUtils from './StringUtils'; @@ -1128,13 +1129,11 @@ function getReportActionHtml(reportAction: PartialReportAction): string { function getReportActionText(reportAction: PartialReportAction): string { const html = getReportActionHtml(reportAction); - const parser = new ExpensiMark(); - return html ? parser.htmlToText(html) : ''; + return html ? parseHtmlToText(html) : ''; } function getTextFromHtml(html?: string): string { - const parser = new ExpensiMark(); - return html ? parser.htmlToText(html) : ''; + return html ? parseHtmlToText(html) : ''; } function getMemberChangeMessageFragment(reportAction: OnyxEntry): Message {