Skip to content

Commit

Permalink
Merge pull request #31265 from rezkiy37/feature/29582-pin-workspace-chat
Browse files Browse the repository at this point in the history
Pin workspace chats upon creation
  • Loading branch information
puneetlath authored Nov 20, 2023
2 parents 220edfe + c0c8580 commit 85a1e49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/ReportUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2941,12 +2941,13 @@ function buildOptimisticChatReport(
welcomeMessage = '',
) {
const currentTime = DateUtils.getDBTime();
const isNewlyCreatedWorkspaceChat = chatType === CONST.REPORT.CHAT_TYPE.POLICY_EXPENSE_CHAT && isOwnPolicyExpenseChat;
return {
type: CONST.REPORT.TYPE.CHAT,
chatType,
hasOutstandingIOU: false,
isOwnPolicyExpenseChat,
isPinned: reportName === CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS,
isPinned: reportName === CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS || isNewlyCreatedWorkspaceChat,
lastActorAccountID: 0,
lastMessageTranslationKey: '',
lastMessageHtml: '',
Expand Down

0 comments on commit 85a1e49

Please sign in to comment.