Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate welcome message to room description for report #34150

Merged
merged 58 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
cf01991
Migrate welcome message to room description for report
esh-g Jan 9, 2024
a1942f8
Fix style 💫
esh-g Jan 9, 2024
5be28c7
Fix Permissions
esh-g Jan 9, 2024
6e7fc27
Requested changes
esh-g Jan 14, 2024
e28f6cd
Hide Description conditionally
esh-g Jan 14, 2024
10ef66b
Update spanish translations
esh-g Jan 16, 2024
e9c31ba
Merge branch 'main' into room-description
esh-g Jan 16, 2024
03567bd
Fix header for tasks
esh-g Jan 16, 2024
6685a9a
Reconcile description route and permission
esh-g Jan 19, 2024
ec7426f
Merge branch 'main' into room-description
esh-g Jan 19, 2024
dd34052
Fix lint
esh-g Jan 19, 2024
0c6a9e4
Fix TS
esh-g Jan 19, 2024
87131a3
Fix permission
esh-g Jan 19, 2024
7d6abca
Merge branch 'main' into room-description
esh-g Jan 23, 2024
64c71e1
Merge branch 'main' into room-description
esh-g Jan 26, 2024
356571d
Fix conflict
esh-g Jan 26, 2024
39dd76b
Migrate TS
esh-g Jan 26, 2024
7c31359
Fix TS
esh-g Jan 26, 2024
9b4d481
Pressable redirect
esh-g Jan 26, 2024
300a161
Fix
esh-g Jan 26, 2024
f970c6b
Make permission changes
esh-g Jan 26, 2024
6c48a0b
Merge branch 'main' into room-description
esh-g Jan 30, 2024
1dd6943
Fix conflict
esh-g Jan 30, 2024
7fa7514
Limit characters to 1024
esh-g Jan 30, 2024
2efe2db
Fix lint
esh-g Jan 30, 2024
71dda56
Improvement of header for small screens
esh-g Jan 30, 2024
0823955
Add offline pattern
esh-g Jan 30, 2024
c2ad5db
Fix new task description
esh-g Jan 31, 2024
52db819
hide description menuItem for tasks
esh-g Jan 31, 2024
0dffd61
rename AdditionalComponent -> renderAdditionalText
esh-g Jan 31, 2024
9a0c929
Fix lint
esh-g Jan 31, 2024
131cfb7
Merge branch 'main' into room-description
esh-g Jan 31, 2024
d4f9e1e
Fix header
esh-g Jan 31, 2024
2a7f097
Make in lowercase
esh-g Jan 31, 2024
c614c34
Fixed 'in' bold issue
esh-g Jan 31, 2024
8e0b7dc
Change condition
esh-g Jan 31, 2024
ecbfc72
Remove welcome message
esh-g Jan 31, 2024
1b811d1
Fix android
esh-g Feb 1, 2024
38519c2
Merge branch 'main' into room-description
esh-g Feb 1, 2024
23d8806
Fix chat mast head text
esh-g Feb 1, 2024
2d88180
Fix lint
esh-g Feb 1, 2024
901d57e
Fix tests
esh-g Feb 1, 2024
fcd5763
Fix lint
esh-g Feb 1, 2024
9b02507
Limit length
esh-g Feb 2, 2024
c67793e
Fix lint
esh-g Feb 2, 2024
f56e6c8
wrap html
esh-g Feb 2, 2024
37a31ee
Merge branch 'main' into room-description
esh-g Feb 2, 2024
9e8dd6d
Fix conflicts
esh-g Feb 2, 2024
5ddfaac
Disable enter prop
esh-g Feb 3, 2024
fd0dbad
Fix lint
esh-g Feb 3, 2024
fc60fa6
Anonymous action check
esh-g Feb 4, 2024
64866a0
Merge branch 'main' into room-description
esh-g Feb 5, 2024
d2b78af
Fix conflict
esh-g Feb 5, 2024
a97a63c
Prettify
esh-g Feb 5, 2024
5c4177f
Remove openReport
esh-g Feb 5, 2024
5630493
Update src/libs/ReportUtils.ts
esh-g Feb 5, 2024
00f6681
Update src/pages/RoomDescriptionPage.tsx
esh-g Feb 5, 2024
2df9043
Update src/pages/RoomDescriptionPage.tsx
esh-g Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,6 @@ const CONST = {
INVITE: 'invite',
SETTINGS: 'settings',
LEAVE_ROOM: 'leaveRoom',
WELCOME_MESSAGE: 'welcomeMessage',
PRIVATE_NOTES: 'privateNotes',
},
EDIT_REQUEST_FIELD: {
Expand Down
8 changes: 4 additions & 4 deletions src/ONYXKEYS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ const ONYXKEYS = {
DISPLAY_NAME_FORM_DRAFT: 'displayNameFormDraft',
ROOM_NAME_FORM: 'roomNameForm',
ROOM_NAME_FORM_DRAFT: 'roomNameFormDraft',
WELCOME_MESSAGE_FORM: 'welcomeMessageForm',
WELCOME_MESSAGE_FORM_DRAFT: 'welcomeMessageFormDraft',
REPORT_DESCRIPTION_FORM: 'reportDescriptionForm',
REPORT_DESCRIPTION_FORM_DRAFT: 'reportDescriptionFormDraft',
LEGAL_NAME_FORM: 'legalNameForm',
LEGAL_NAME_FORM_DRAFT: 'legalNameFormDraft',
WORKSPACE_INVITE_MESSAGE_FORM: 'workspaceInviteMessageForm',
Expand Down Expand Up @@ -478,8 +478,8 @@ type OnyxValues = {
[ONYXKEYS.FORMS.DISPLAY_NAME_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.ROOM_NAME_FORM]: OnyxTypes.Form;
[ONYXKEYS.FORMS.ROOM_NAME_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.WELCOME_MESSAGE_FORM]: OnyxTypes.Form;
[ONYXKEYS.FORMS.WELCOME_MESSAGE_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.REPORT_DESCRIPTION_FORM]: OnyxTypes.Form;
[ONYXKEYS.FORMS.REPORT_DESCRIPTION_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.LEGAL_NAME_FORM]: OnyxTypes.Form;
[ONYXKEYS.FORMS.LEGAL_NAME_FORM_DRAFT]: OnyxTypes.Form;
[ONYXKEYS.FORMS.WORKSPACE_INVITE_MESSAGE_FORM]: OnyxTypes.Form;
Expand Down
6 changes: 3 additions & 3 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ const ROUTES = {
route: 'r/:reportID/settings/who-can-post',
getRoute: (reportID: string) => `r/${reportID}/settings/who-can-post` as const,
},
REPORT_WELCOME_MESSAGE: {
route: 'r/:reportID/welcomeMessage',
getRoute: (reportID: string) => `r/${reportID}/welcomeMessage` as const,
REPORT_DESCRIPTION: {
route: 'r/:reportID/roomDescription',
getRoute: (reportID: string) => `r/${reportID}/roomDescription` as const,
},
SPLIT_BILL_DETAILS: {
route: 'r/:reportID/split/:reportActionID',
Expand Down
4 changes: 2 additions & 2 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const SCREENS = {
PROFILE: 'Profile',
REPORT_DETAILS: 'Report_Details',
REPORT_SETTINGS: 'Report_Settings',
REPORT_WELCOME_MESSAGE: 'Report_WelcomeMessage',
REPORT_DESCRIPTION: 'Report_Description',
PARTICIPANTS: 'Participants',
MONEY_REQUEST: 'MoneyRequest',
NEW_TASK: 'NewTask',
Expand Down Expand Up @@ -233,7 +233,7 @@ const SCREENS = {
DETAILS_ROOT: 'Details_Root',
PROFILE_ROOT: 'Profile_Root',
PROCESS_MONEY_REQUEST_HOLD_ROOT: 'ProcessMoneyRequestHold_Root',
REPORT_WELCOME_MESSAGE_ROOT: 'Report_WelcomeMessage_Root',
REPORT_DESCRIPTION_ROOT: 'Report_Description_Root',
REPORT_PARTICIPANTS_ROOT: 'ReportParticipants_Root',
ROOM_MEMBERS_ROOT: 'RoomMembers_Root',
ROOM_INVITE_ROOT: 'RoomInvite_Root',
Expand Down
27 changes: 17 additions & 10 deletions src/components/ReportWelcomeText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type {PersonalDetailsList, Policy, Report} from '@src/types/onyx';
import RenderHTML from './RenderHTML';
import Text from './Text';
import UserDetailsTooltip from './UserDetailsTooltip';

Expand Down Expand Up @@ -73,17 +74,23 @@ function ReportWelcomeText({report, policy, personalDetails}: ReportWelcomeTextP
)}
{isChatRoom && (
<>
<Text>{roomWelcomeMessage.phrase1}</Text>
{roomWelcomeMessage.showReportName && (
<Text
style={[styles.textStrong]}
onPress={navigateToReport}
suppressHighlighting
>
{ReportUtils.getReportName(report)}
</Text>
{report?.description ? (
<RenderHTML html={report.description} />
esh-g marked this conversation as resolved.
Show resolved Hide resolved
) : (
<>
<Text>{roomWelcomeMessage.phrase1}</Text>
{roomWelcomeMessage.showReportName && (
<Text
style={[styles.textStrong]}
onPress={navigateToReport}
suppressHighlighting
>
{ReportUtils.getReportName(report)}
</Text>
)}
{roomWelcomeMessage.phrase2 !== undefined && <Text>{roomWelcomeMessage.phrase2}</Text>}
esh-g marked this conversation as resolved.
Show resolved Hide resolved
</>
)}
{roomWelcomeMessage.phrase2 !== undefined && <Text>{roomWelcomeMessage.phrase2}</Text>}
</>
)}
{isDefault && (
Expand Down
8 changes: 4 additions & 4 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1033,10 +1033,10 @@ export default {
},
},
},
welcomeMessagePage: {
welcomeMessage: 'Welcome message',
welcomeMessageOptional: 'Welcome message (optional)',
explainerText: 'Set a custom welcome message that will be sent to users when they join this room.',
reportDescriptionPage: {
roomDescription: 'Room description',
roomDescriptionOptional: 'Room description (optional)',
explainerText: 'Set a custom decription for the room.',
},
languagePage: {
language: 'Language',
Expand Down
8 changes: 4 additions & 4 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1032,10 +1032,10 @@ export default {
},
},
},
welcomeMessagePage: {
welcomeMessage: 'Mensaje de bienvenida',
welcomeMessageOptional: 'Mensaje de bienvenida (opcional)',
explainerText: 'Configura un mensaje de bienvenida privado y personalizado que se enviará cuando los usuarios se unan a esta sala de chat.',
reportDescriptionPage: {
roomDescription: 'Descripción de la habitación',
roomDescriptionOptional: 'Descripción de la habitación (opcional)',
explainerText: 'Establece una descripción personalizada para la habitación.',
},
languagePage: {
language: 'Idioma',
Expand Down
1 change: 0 additions & 1 deletion src/libs/E2E/apiMocks/openReport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export default (): Response => ({
lastMessageText: 'terry+hightraffic@margelo.io owes \u20ac12.00',
lastActorAccountID: 14567013,
notificationPreference: 'always',
welcomeMessage: '',
stateNum: 0,
statusNum: 0,
oldPolicyName: '',
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Navigation/AppNavigator/ModalStackNavigators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import type {
ProfileNavigatorParamList,
ReferralDetailsNavigatorParamList,
ReimbursementAccountNavigatorParamList,
ReportDescriptionNavigatorParamList,
ReportDetailsNavigatorParamList,
ReportSettingsNavigatorParamList,
ReportWelcomeMessageNavigatorParamList,
RoomInviteNavigatorParamList,
RoomMembersNavigatorParamList,
SearchNavigatorParamList,
Expand Down Expand Up @@ -141,8 +141,8 @@ const TaskModalStackNavigator = createModalStackNavigator<TaskDetailsNavigatorPa
[SCREENS.TASK.ASSIGNEE]: () => require('../../../pages/tasks/TaskAssigneeSelectorModal').default as React.ComponentType,
});

const ReportWelcomeMessageModalStackNavigator = createModalStackNavigator<ReportWelcomeMessageNavigatorParamList>({
[SCREENS.REPORT_WELCOME_MESSAGE_ROOT]: () => require('../../../pages/ReportWelcomeMessagePage').default as React.ComponentType,
const ReportDescriptionModalStackNavigator = createModalStackNavigator<ReportDescriptionNavigatorParamList>({
[SCREENS.REPORT_DESCRIPTION_ROOT]: () => require('../../../pages/ReportDescriptionPage').default as React.ComponentType,
});

const ReportParticipantsModalStackNavigator = createModalStackNavigator<ParticipantsNavigatorParamList>({
Expand Down Expand Up @@ -295,7 +295,7 @@ export {
ReportDetailsModalStackNavigator,
TaskModalStackNavigator,
ReportSettingsModalStackNavigator,
ReportWelcomeMessageModalStackNavigator,
ReportDescriptionModalStackNavigator,
ReportParticipantsModalStackNavigator,
SearchModalStackNavigator,
NewChatModalStackNavigator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ function RightModalNavigator({navigation}: RightModalNavigatorProps) {
component={ModalStackNavigators.ReportSettingsModalStackNavigator}
/>
<Stack.Screen
name={SCREENS.RIGHT_MODAL.REPORT_WELCOME_MESSAGE}
component={ModalStackNavigators.ReportWelcomeMessageModalStackNavigator}
name={SCREENS.RIGHT_MODAL.REPORT_DESCRIPTION}
component={ModalStackNavigators.ReportDescriptionModalStackNavigator}
/>
<Stack.Screen
name={SCREENS.RIGHT_MODAL.PARTICIPANTS}
Expand Down
4 changes: 2 additions & 2 deletions src/libs/Navigation/linkingConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ const linkingConfig: LinkingOptions<RootStackParamList> = {
},
},
},
[SCREENS.RIGHT_MODAL.REPORT_WELCOME_MESSAGE]: {
[SCREENS.RIGHT_MODAL.REPORT_DESCRIPTION]: {
screens: {
[SCREENS.REPORT_WELCOME_MESSAGE_ROOT]: ROUTES.REPORT_WELCOME_MESSAGE.route,
[SCREENS.REPORT_DESCRIPTION_ROOT]: ROUTES.REPORT_DESCRIPTION.route,
},
},
[SCREENS.RIGHT_MODAL.NEW_CHAT]: {
Expand Down
8 changes: 4 additions & 4 deletions src/libs/Navigation/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ type ReportSettingsNavigatorParamList = {
[SCREENS.REPORT_SETTINGS.WRITE_CAPABILITY]: undefined;
};

type ReportWelcomeMessageNavigatorParamList = {
[SCREENS.REPORT_WELCOME_MESSAGE_ROOT]: {reportID: string};
type ReportDescriptionNavigatorParamList = {
[SCREENS.REPORT_DESCRIPTION_ROOT]: {reportID: string};
};

type ParticipantsNavigatorParamList = {
Expand Down Expand Up @@ -361,7 +361,7 @@ type RightModalNavigatorParamList = {
[SCREENS.RIGHT_MODAL.PROFILE]: NavigatorScreenParams<ProfileNavigatorParamList>;
[SCREENS.RIGHT_MODAL.REPORT_DETAILS]: NavigatorScreenParams<ReportDetailsNavigatorParamList>;
[SCREENS.RIGHT_MODAL.REPORT_SETTINGS]: NavigatorScreenParams<ReportSettingsNavigatorParamList>;
[SCREENS.RIGHT_MODAL.REPORT_WELCOME_MESSAGE]: NavigatorScreenParams<ReportWelcomeMessageNavigatorParamList>;
[SCREENS.RIGHT_MODAL.REPORT_DESCRIPTION]: NavigatorScreenParams<ReportDescriptionNavigatorParamList>;
[SCREENS.RIGHT_MODAL.PARTICIPANTS]: NavigatorScreenParams<ParticipantsNavigatorParamList>;
[SCREENS.RIGHT_MODAL.ROOM_MEMBERS]: NavigatorScreenParams<RoomMembersNavigatorParamList>;
[SCREENS.RIGHT_MODAL.ROOM_INVITE]: NavigatorScreenParams<RoomInviteNavigatorParamList>;
Expand Down Expand Up @@ -447,7 +447,7 @@ export type {
ReportDetailsNavigatorParamList,
ReportSettingsNavigatorParamList,
TaskDetailsNavigatorParamList,
ReportWelcomeMessageNavigatorParamList,
ReportDescriptionNavigatorParamList,
ParticipantsNavigatorParamList,
RoomMembersNavigatorParamList,
RoomInviteNavigatorParamList,
Expand Down
22 changes: 16 additions & 6 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ type OptimisticChatReport = Pick<
| 'stateNum'
| 'statusNum'
| 'visibility'
| 'welcomeMessage'
| 'description'
| 'writeCapability'
>;

Expand Down Expand Up @@ -2388,6 +2388,15 @@ function getParsedComment(text: string): string {
return text.length <= CONST.MAX_MARKUP_LENGTH ? parser.replace(text) : lodashEscape(text);
}

function getReportDescriptionText(report: Report): string {
if (!report.description) {
return '';
}

const parser = new ExpensiMark();
return parser.htmlToText(report.description);
}

function buildOptimisticAddCommentReportAction(text?: string, file?: File): OptimisticReportAction {
const parser = new ExpensiMark();
const commentText = getParsedComment(text ?? '');
Expand Down Expand Up @@ -3075,7 +3084,7 @@ function buildOptimisticChatReport(
notificationPreference: NotificationPreference = CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS,
parentReportActionID = '',
parentReportID = '',
welcomeMessage = '',
description = '',
): OptimisticChatReport {
const currentTime = DateUtils.getDBTime();
const isNewlyCreatedWorkspaceChat = chatType === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT && isOwnPolicyExpenseChat;
Expand Down Expand Up @@ -3104,7 +3113,7 @@ function buildOptimisticChatReport(
stateNum: 0,
statusNum: 0,
visibility,
welcomeMessage,
description,
writeCapability,
};
}
Expand Down Expand Up @@ -3585,7 +3594,7 @@ function canFlagReportAction(reportAction: OnyxEntry<ReportAction>, reportID: st
reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.CHRONOSOOOLIST;
if (ReportActionsUtils.isWhisperAction(reportAction)) {
// Allow flagging welcome message whispers as they can be set by any room creator
if (report?.welcomeMessage && !isCurrentUserAction && isOriginalMessageHaveHtml && reportAction?.originalMessage?.html === report.welcomeMessage) {
if (report?.description && !isCurrentUserAction && isOriginalMessageHaveHtml && reportAction?.originalMessage?.html === report.description) {
return true;
}

Expand Down Expand Up @@ -4270,7 +4279,7 @@ function getRoom(type: ValueOf<typeof CONST.REPORT.CHAT_TYPE>, policyID: string)
/**
* We only want policy owners and admins to be able to modify the welcome message, but not in thread chat.
*/
function shouldDisableWelcomeMessage(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
function shouldDisableReportDescription(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
return isMoneyRequestReport(report) || isArchivedRoom(report) || !isChatRoom(report) || isChatThread(report) || !PolicyUtils.isPolicyAdmin(policy);
}
/**
Expand Down Expand Up @@ -4525,13 +4534,14 @@ export {
getReimbursementDeQueuedActionMessage,
getPersonalDetailsForAccountID,
getRoom,
shouldDisableWelcomeMessage,
shouldDisableReportDescription,
navigateToPrivateNotes,
canEditWriteCapability,
hasSmartscanError,
shouldAutoFocusOnKeyPress,
shouldDisplayThreadReplies,
shouldDisableThread,
getReportDescriptionText,
};

export type {ExpenseOriginalMessage, OptionData, OptimisticChatReport};
26 changes: 13 additions & 13 deletions src/libs/actions/Report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1481,39 +1481,39 @@ function toggleSubscribeToChildReport(childReportID = '0', parentReportAction: P
}
}

function updateWelcomeMessage(reportID: string, previousValue: string, newValue: string) {
function updateDescription(reportID: string, previousValue: string, newValue: string) {
// No change needed, navigate back
if (previousValue === newValue) {
Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(reportID));
Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(reportID));
return;
}

const parsedWelcomeMessage = ReportUtils.getParsedComment(newValue);
const parsedDescription = ReportUtils.getParsedComment(newValue);

const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {welcomeMessage: parsedWelcomeMessage},
value: {description: parsedDescription},
},
];
const failureData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${reportID}`,
value: {welcomeMessage: previousValue},
value: {description: previousValue},
},
];

type UpdateWelcomeMessageParameters = {
type UpdateReportDescriptionParameters = {
reportID: string;
welcomeMessage: string;
description: string;
};

const parameters: UpdateWelcomeMessageParameters = {reportID, welcomeMessage: parsedWelcomeMessage};
const parameters: UpdateReportDescriptionParameters = {reportID, description: parsedDescription};

API.write('UpdateWelcomeMessage', parameters, {optimisticData, failureData});
Navigation.goBack(ROUTES.REPORT_SETTINGS.getRoute(reportID));
API.write('UpdateRoomDescription', parameters, {optimisticData, failureData});
Navigation.goBack(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(reportID));
}

function updateWriteCapabilityAndNavigate(report: Report, newValue: WriteCapability) {
Expand Down Expand Up @@ -1649,7 +1649,7 @@ function addPolicyReport(policyReport: ReportUtils.OptimisticChatReport) {
reportName?: string;
visibility?: ValueOf<typeof CONST.REPORT.VISIBILITY>;
writeCapability?: WriteCapability;
welcomeMessage?: string;
description?: string;
};

const parameters: AddWorkspaceRoomParameters = {
Expand All @@ -1659,7 +1659,7 @@ function addPolicyReport(policyReport: ReportUtils.OptimisticChatReport) {
reportID: policyReport.reportID,
createdReportActionID: createdReportAction.reportActionID,
writeCapability: policyReport.writeCapability,
welcomeMessage: policyReport.welcomeMessage,
description: policyReport.description,
};

API.write('AddWorkspaceRoom', parameters, {optimisticData, successData, failureData});
Expand Down Expand Up @@ -2590,7 +2590,7 @@ export {
addComment,
addAttachment,
reconnect,
updateWelcomeMessage,
updateDescription,
updateWriteCapabilityAndNavigate,
updateNotificationPreference,
subscribeToReportTypingEvents,
Expand Down
Loading
Loading