-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes the "Room chat LHN preview displays "removed 0 user" after editing room description " #44300
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -352,6 +352,11 @@ function getOptionData({ | |
: ` ${Localize.translate(preferredLocale, 'workspace.invite.from')}`; | ||
result.alternateText += `${preposition} ${roomName}`; | ||
} | ||
if (lastActionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) { | ||
result.alternateText = `${lastActorDisplayName} ${Localize.translate(preferredLocale, 'roomChangeLog.updateRoomDescription')} ${ | ||
lastActionOriginalMessage?.description | ||
}`.trim(); | ||
} | ||
Comment on lines
+356
to
+359
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We always display There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opps, I was perhaps not in my best mind while reviewing this PR 😓 , thanks for pointing that out @hungvu193 🙌 Edit: ahh now that i look at the original issue, i recall that this was the last deploy blocker and needed to be reviewed quickly hence the hurry to deploy caused the quality of the PR to come done, honest mistake 😅 |
||
} else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.LEAVE_POLICY) { | ||
result.alternateText = Localize.translateLocal('workspace.invite.leftWorkspace'); | ||
} else if (lastAction?.actionName !== CONST.REPORT.ACTIONS.TYPE.REPORT_PREVIEW && lastActorDisplayName && lastMessageTextFromReport) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,7 +62,7 @@ import ONYXKEYS from '@src/ONYXKEYS'; | |
import ROUTES from '@src/ROUTES'; | ||
import type * as OnyxTypes from '@src/types/onyx'; | ||
import type {Errors} from '@src/types/onyx/OnyxCommon'; | ||
import type {JoinWorkspaceResolution} from '@src/types/onyx/OriginalMessage'; | ||
import type {JoinWorkspaceResolution, OriginalMessageChangeLog} from '@src/types/onyx/OriginalMessage'; | ||
import {isEmptyObject} from '@src/types/utils/EmptyObject'; | ||
import {RestrictedReadOnlyContextMenuActions} from './ContextMenu/ContextMenuActions'; | ||
import MiniReportActionContextMenu from './ContextMenu/MiniReportActionContextMenu'; | ||
|
@@ -623,6 +623,9 @@ function ReportActionItem({ | |
children = <ReportActionItemBasicMessage message={translate('iou.unheldExpense')} />; | ||
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.MERGED_WITH_CASH_TRANSACTION) { | ||
children = <ReportActionItemBasicMessage message={translate('systemMessage.mergedWithCashTransaction')} />; | ||
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.UPDATE_ROOM_DESCRIPTION) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ishpaul777 check out all the |
||
const message = `${translate('roomChangeLog.updateRoomDescription')} ${(originalMessage as OriginalMessageChangeLog)?.description}`; | ||
children = <ReportActionItemBasicMessage message={message} />; | ||
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.DISMISSED_VIOLATION)) { | ||
children = <ReportActionItemBasicMessage message={ReportActionsUtils.getDismissedViolationMessageText(ReportActionsUtils.getOriginalMessage(action))} />; | ||
} else { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We missed the case if the room description is markdown/html/emojis, this overlook caused #44448.
Never thought that i would have to comment on the PR that i myself reviewed 😆 . I agree that this should had been noticed during testing but it was missed, i will be more careful moving forward