Skip to content

Commit

Permalink
fix: chat with only task is hidden from lhn
Browse files Browse the repository at this point in the history
  • Loading branch information
mkzie2 committed Oct 16, 2024
1 parent e8a8c53 commit c4bec93
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/libs/actions/Task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,19 @@ function createTaskAndNavigate(
},
);

const shouldUpdateNotificationPrefernece = !isEmptyObject(parentReport) && ReportUtils.getReportNotificationPreference(parentReport) === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;
if (shouldUpdateNotificationPrefernece) {
optimisticData.push({
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${parentReportID}`,
value: {
participants: {
[currentUserAccountID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.ALWAYS},
},
},
});
}

// FOR QUICK ACTION NVP
optimisticData.push({
onyxMethod: Onyx.METHOD.SET,
Expand Down

0 comments on commit c4bec93

Please sign in to comment.