Skip to content

Commit 111cfbf

Browse files
authored
Merge pull request Expensify#70634 from nkdengineer/fix/70348
fix: Pay-403 Forbidden console error
2 parents ed8a9ac + 97ee0aa commit 111cfbf

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/libs/actions/IOU.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8645,6 +8645,9 @@ function getSendMoneyParams(
86458645
...optimisticIOUReport,
86468646
lastMessageText: getReportActionText(optimisticIOUReportAction),
86478647
lastMessageHtml: getReportActionHtml(optimisticIOUReportAction),
8648+
pendingFields: {
8649+
createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
8650+
},
86488651
},
86498652
};
86508653
const optimisticTransactionThreadData: OnyxUpdate = {

src/pages/home/ReportScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ function ReportScreen({route, navigation}: ReportScreenProps) {
703703
return;
704704
}
705705
// Ensures the optimistic report is created successfully
706-
if (reportIDFromRoute !== report?.reportID) {
706+
if (reportIDFromRoute !== report?.reportID || report?.pendingFields?.createChat) {
707707
return;
708708
}
709709
// Ensures subscription event succeeds when the report/workspace room is created optimistically.

0 commit comments

Comments
 (0)