diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 6a2ceb006bab..0008138406f0 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2858,10 +2858,19 @@ function getUpdatedManualApprovalThresholdMessage(reportAction: OnyxEntry(reportAction: OnyxEntry) { const {mentionedAccountIDs} = getOriginalMessage(reportAction as ReportAction) ?? {}; - if (!mentionedAccountIDs?.length) { + // If mentionedAccountIDs exists and has values, use the first one + if (mentionedAccountIDs?.length) { + return translateLocal('iou.changeApprover.changedApproverMessage', {managerID: mentionedAccountIDs.at(0) ?? CONST.DEFAULT_NUMBER_ID}); + } + + // Fallback: If mentionedAccountIDs is missing (common with OldDot take control actions), + // use the actorAccountID (who performed the take control action) as the new approver + const actorAccountID = reportAction?.actorAccountID; + if (!actorAccountID) { return ''; } - return translateLocal('iou.changeApprover.changedApproverMessage', {managerID: mentionedAccountIDs.at(0) ?? CONST.DEFAULT_NUMBER_ID}); + + return translateLocal('iou.changeApprover.changedApproverMessage', {managerID: actorAccountID}); } function isCardIssuedAction(