Skip to content

Commit 97ee0aa

Browse files
committed
fix: Pay-403 Forbidden console error
1 parent ae3b077 commit 97ee0aa

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
@@ -8630,6 +8630,9 @@ function getSendMoneyParams(
86308630
...optimisticIOUReport,
86318631
lastMessageText: getReportActionText(optimisticIOUReportAction),
86328632
lastMessageHtml: getReportActionHtml(optimisticIOUReportAction),
8633+
pendingFields: {
8634+
createChat: CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD,
8635+
},
86338636
},
86348637
};
86358638
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)