@@ -55,7 +55,7 @@ import {formatPhoneNumber} from '@libs/LocalePhoneNumber';
5555import Navigation from '@libs/Navigation/Navigation' ;
5656import Permissions from '@libs/Permissions' ;
5757import { getDisplayNameOrDefault } from '@libs/PersonalDetailsUtils' ;
58- import { getCleanedTagName , isPolicyAdmin , isPolicyOwner } from '@libs/PolicyUtils' ;
58+ import { getCleanedTagName , getPersonalPolicy , isPolicyAdmin , isPolicyOwner } from '@libs/PolicyUtils' ;
5959import {
6060 extractLinksFromMessageHtml ,
6161 getAddedApprovalRuleMessage ,
@@ -148,6 +148,7 @@ import {
148148 isChatThread ,
149149 isCompletedTaskReport ,
150150 isExpenseReport ,
151+ isPolicyRelatedReport ,
151152 isTaskReport ,
152153 shouldDisplayThreadReplies as shouldDisplayThreadRepliesUtils ,
153154} from '@libs/ReportUtils' ;
@@ -820,8 +821,9 @@ function PureReportActionItem({
820821 }
821822
822823 const actionableMentionWhisperOptions = [ ] ;
824+ const isReportInPolicy = ! ! report ?. policyID && report . policyID !== CONST . POLICY . ID_FAKE && getPersonalPolicy ( ) ?. id !== report . policyID ;
823825
824- if ( isExpenseReport ( report ) && ( isPolicyAdmin ( policy ) || isPolicyOwner ( policy , currentUserAccountID ) ) ) {
826+ if ( isReportInPolicy && ( isPolicyAdmin ( policy ) || isPolicyOwner ( policy , currentUserAccountID ) ) ) {
825827 actionableMentionWhisperOptions . push ( {
826828 text : 'actionableMentionWhisperOptions.inviteToSubmitExpense' ,
827829 key : `${ action . reportActionID } -actionableMentionWhisper-${ CONST . REPORT . ACTIONABLE_MENTION_WHISPER_RESOLUTION . INVITE_TO_SUBMIT_EXPENSE } ` ,
0 commit comments