Ensure that outgoing gift badges can be Viewed

This commit is contained in:
Scott Nonnenberg 2022-07-12 09:39:18 -07:00 committed by GitHub
parent 14591358f1
commit fc98d54326
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 6 deletions

View file

@ -593,6 +593,7 @@ export class Message extends React.PureComponent<Props, State> {
{
attachments,
deletedForEveryone,
direction,
expirationLength,
expirationTimestamp,
giftBadge,
@ -615,7 +616,7 @@ export class Message extends React.PureComponent<Props, State> {
}
if (giftBadge) {
const description = i18n('message--giftBadge--unopened');
const description = i18n(`message--giftBadge--unopened--${direction}`);
const isDescriptionRTL = getDirection(description) === 'rtl';
if (giftBadge.state === GiftBadgeStates.Unopened && !isDescriptionRTL) {