Skip to content

Commit

Permalink
fix: stale personal details while creating task with new user
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Jun 4, 2024
1 parent 287cd6a commit 0dc7238
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 @@ -6043,18 +6043,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 0dc7238

Please sign in to comment.