diff --git a/src/pages/home/HeaderView.js b/src/pages/home/HeaderView.js index 0647310940bd..a7d81d1a32dd 100644 --- a/src/pages/home/HeaderView.js +++ b/src/pages/home/HeaderView.js @@ -102,6 +102,7 @@ function HeaderView(props) { const parentReportAction = ReportActionsUtils.getParentReportAction(props.report); const isCanceledTaskReport = ReportUtils.isCanceledTaskReport(props.report, parentReportAction); const lastVisibleMessage = ReportActionsUtils.getLastVisibleMessage(props.report.reportID); + const isWhisperAction = ReportActionsUtils.isWhisperAction(parentReportAction); const isEmptyChat = !props.report.lastMessageText && !props.report.lastMessageTranslationKey && !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey; const isUserCreatedPolicyRoom = ReportUtils.isUserCreatedPolicyRoom(props.report); const isPolicyMember = useMemo(() => !_.isEmpty(props.policy), [props.policy]); @@ -134,7 +135,7 @@ function HeaderView(props) { } if ((isChatThread && !isEmptyChat) || isUserCreatedPolicyRoom || canLeaveRoom) { - if (props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { + if (!isWhisperAction && props.report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN) { threeDotMenuItems.push({ icon: Expensicons.ChatBubbles, text: translate('common.join'), diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.js b/src/pages/home/report/ContextMenu/ContextMenuActions.js index 5e6f2d46abda..6f26ce0cba1c 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.js +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.js @@ -131,7 +131,12 @@ export default [ const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); const isModifiedExpenseAction = ReportActionsUtils.isModifiedExpenseAction(reportAction); const isTaskAction = ReportActionsUtils.isTaskAction(reportAction); - return (isCommentAction || isReportPreviewAction || isIOUAction || isModifiedExpenseAction || isTaskAction) && !ReportUtils.isThreadFirstChat(reportAction, reportID); + const isWhisperAction = ReportActionsUtils.isWhisperAction(reportAction); + return ( + !isWhisperAction && + (isCommentAction || isReportPreviewAction || isIOUAction || isModifiedExpenseAction || isTaskAction) && + !ReportUtils.isThreadFirstChat(reportAction, reportID) + ); }, onPress: (closePopover, {reportAction, reportID}) => { if (closePopover) { @@ -162,7 +167,8 @@ export default [ const isCommentAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT && !ReportUtils.isThreadFirstChat(reportAction, reportID); const isReportPreviewAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.REPORTPREVIEW; const isIOUAction = reportAction.actionName === CONST.REPORT.ACTIONS.TYPE.IOU && !ReportActionsUtils.isSplitBillAction(reportAction); - return !subscribed && (isCommentAction || isReportPreviewAction || isIOUAction); + const isWhisperAction = ReportActionsUtils.isWhisperAction(reportAction); + return !subscribed && !isWhisperAction && (isCommentAction || isReportPreviewAction || isIOUAction); }, onPress: (closePopover, {reportAction, reportID}) => { let childReportNotificationPreference = lodashGet(reportAction, 'childReportNotificationPreference', '');