Skip to content

Commit

Permalink
refactor: modify logics to use isInviteOrRemovedAction
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Mar 7, 2025
1 parent 81e6465 commit fb4b7ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ function isCreatedAction(reportAction: OnyxInputOrEntry<ReportAction>): boolean
}

function isDeletedAction(reportAction: OnyxInputOrEntry<ReportAction | OptimisticIOUReportAction>): boolean {
const message = reportAction?.message ?? [];

if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM) {
if (isInviteOrRemovedAction(reportAction)) {
return false;
}

const message = reportAction?.message ?? [];

if (!Array.isArray(message)) {
return message?.html === '' || !!message?.deleted;
}
Expand Down

0 comments on commit fb4b7ed

Please sign in to comment.