Skip to content

Commit

Permalink
Merge pull request #30609 from abzokhattab/parsing-welcome-msg-in-cre…
Browse files Browse the repository at this point in the history
…ate-new-room-action

Parsing the welcome message into html in the create new room action
  • Loading branch information
neil-marcellini authored Nov 1, 2023
2 parents aa18b6d + 3f03a24 commit bb51400
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libs/actions/Report.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);

Expand Down Expand Up @@ -1622,7 +1623,7 @@ function addPolicyReport(policyID, reportName, visibility, policyMembersAccountI
reportID: policyReport.reportID,
createdReportActionID: createdReportAction.reportActionID,
writeCapability,
welcomeMessage,
welcomeMessage: parsedWelcomeMessage,
},
{optimisticData, successData, failureData},
);
Expand Down

0 comments on commit bb51400

Please sign in to comment.