Skip to content

Commit

Permalink
Merge pull request #40352 from bernhardoj/fix/40121-update-task-last-…
Browse files Browse the repository at this point in the history
…message-title-correctly

Fix task last message title doesn't update optimistically
  • Loading branch information
lakchote authored Apr 29, 2024
2 parents 777d218 + c711542 commit 33ad5d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/TaskUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function getTaskReportActionMessage(action: OnyxEntry<ReportAction>): Pick<Messa
}

function getTaskTitle(taskReportID: string, fallbackTitle = ''): string {
const taskReport = allReports?.[taskReportID] ?? {};
const taskReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${taskReportID}`] ?? {};
// We need to check for reportID, not just reportName, because when a receiver opens the task for the first time,
// an optimistic report is created with the only property – reportName: 'Chat report',
// and it will be displayed as the task title without checking for reportID to be present.
Expand Down

0 comments on commit 33ad5d2

Please sign in to comment.