Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,8 @@ function isGroupChat(report: OnyxEntry<Report> | Partial<Report>): boolean {

/**
* Only returns true if this is the Expensify DM report.
*
* Note that this chat is no longer used for new users. We still need this function for users who have this chat.
*/
function isSystemChat(report: OnyxEntry<Report>): boolean {
return getChatType(report) === CONST.REPORT.CHAT_TYPE.SYSTEM;
Expand Down Expand Up @@ -6652,18 +6654,6 @@ function shouldReportBeInOptionList(params: ShouldReportBeInOptionListParams) {
return reasonForReportToBeInOptionList(params) !== null;
}

/**
* Returns the system report from the list of reports.
*/
function getSystemChat(): OnyxEntry<Report> {
const allReports = ReportConnection.getAllReports();
if (!allReports) {
return undefined;
}

return Object.values(allReports ?? {}).find((report) => report?.chatType === CONST.REPORT.CHAT_TYPE.SYSTEM);
}

/**
* Attempts to find a report in onyx with the provided list of participants. Does not include threads, task, expense, room, and policy expense chat.
*/
Expand Down Expand Up @@ -8561,7 +8551,6 @@ export {
getRoom,
getRootParentReport,
getRouteFromLink,
getSystemChat,
getTaskAssigneeChatOnyxData,
getTransactionDetails,
getTransactionReportName,
Expand Down