Skip to content

Commit

Permalink
Merge pull request Expensify#43059 from tienifr/fix/42027
Browse files Browse the repository at this point in the history
fix: stale personal details while creating task with new user
  • Loading branch information
Beamanator authored Jun 10, 2024
2 parents f2b7460 + 0dc7238 commit 7540b95
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6091,18 +6091,27 @@ function getTaskAssigneeChatOnyxData(
},
);

successData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${assigneeChatReportID}`,
value: {
pendingFields: {
createChat: null,
// BE will send different report's participants and assigneeAccountID. We clear the optimistic ones to avoid duplicated entries
successData.push(
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${assigneeChatReportID}`,
value: {
pendingFields: {
createChat: null,
},
isOptimisticReport: false,
participants: {[assigneeAccountID]: null},
},
isOptimisticReport: false,
// BE will send a different participant. We clear the optimistic one to avoid duplicated entries
participants: {[assigneeAccountID]: null},
},
});
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
value: {
[assigneeAccountID]: null,
},
},
);

failureData.push(
{
Expand Down

0 comments on commit 7540b95

Please sign in to comment.