From 3f03a24d2c9c1cf39bfd5b80c7fc212658cced39 Mon Sep 17 00:00:00 2001 From: Abdelrahman Khattab Date: Mon, 30 Oct 2023 21:34:28 +0200 Subject: [PATCH] Parsing the welcome message into html in create new room action --- src/libs/actions/Report.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/Report.js b/src/libs/actions/Report.js index 3f7dc76b174d..c56eab004437 100644 --- a/src/libs/actions/Report.js +++ b/src/libs/actions/Report.js @@ -1542,6 +1542,7 @@ function addPolicyReport(policyID, reportName, visibility, policyMembersAccountI // The participants include the current user (admin), and for restricted rooms, the policy members. Participants must not be empty. const members = visibility === CONST.REPORT.VISIBILITY.RESTRICTED ? policyMembersAccountIDs : []; const participants = _.unique([currentUserAccountID, ...members]); + const parsedWelcomeMessage = ReportUtils.getParsedComment(welcomeMessage); const policyReport = ReportUtils.buildOptimisticChatReport( participants, reportName, @@ -1557,7 +1558,7 @@ function addPolicyReport(policyID, reportName, visibility, policyMembersAccountI CONST.REPORT.NOTIFICATION_PREFERENCE.DAILY, '', '', - welcomeMessage, + parsedWelcomeMessage, ); const createdReportAction = ReportUtils.buildOptimisticCreatedReportAction(CONST.POLICY.OWNER_EMAIL_FAKE); @@ -1622,7 +1623,7 @@ function addPolicyReport(policyID, reportName, visibility, policyMembersAccountI reportID: policyReport.reportID, createdReportActionID: createdReportAction.reportActionID, writeCapability, - welcomeMessage, + welcomeMessage: parsedWelcomeMessage, }, {optimisticData, successData, failureData}, );