Skip to content

Commit

Permalink
Merge pull request #36591 from koko57/refactor/34411-lhn-previews-fol…
Browse files Browse the repository at this point in the history
…lowup-name-for-group-chat

Refactor/34411 lhn previews followup name for group chat
  • Loading branch information
mountiny authored Mar 4, 2024
2 parents 061e432 + 0448509 commit af8ef4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4811,7 +4811,7 @@ function isGroupChat(report: OnyxEntry<Report>): boolean {
!isMoneyRequestReport(report) &&
!isArchivedRoom(report) &&
!Object.values(CONST.REPORT.CHAT_TYPE).some((chatType) => chatType === getChatType(report)) &&
(report.participantAccountIDs?.length ?? 0) > 2,
(report.participantAccountIDs?.length ?? 0) > 1,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/libs/SidebarUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ function getOptionData({
.join(' ');
}

result.alternateText = lastMessageText || formattedLogin;
result.alternateText = ReportUtils.isGroupChat(report) && lastActorDisplayName ? `${lastActorDisplayName}: ${lastMessageText}` : lastMessageText || formattedLogin;
}

result.isIOUReportOwner = ReportUtils.isIOUOwnedByCurrentUser(result as Report);
Expand Down

0 comments on commit af8ef4c

Please sign in to comment.