Ensure that outgoing gift badges can be Viewed
This commit is contained in:
parent
14591358f1
commit
fc98d54326
2 changed files with 4 additions and 6 deletions
|
@ -593,6 +593,7 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
{
|
{
|
||||||
attachments,
|
attachments,
|
||||||
deletedForEveryone,
|
deletedForEveryone,
|
||||||
|
direction,
|
||||||
expirationLength,
|
expirationLength,
|
||||||
expirationTimestamp,
|
expirationTimestamp,
|
||||||
giftBadge,
|
giftBadge,
|
||||||
|
@ -615,7 +616,7 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (giftBadge) {
|
if (giftBadge) {
|
||||||
const description = i18n('message--giftBadge--unopened');
|
const description = i18n(`message--giftBadge--unopened--${direction}`);
|
||||||
const isDescriptionRTL = getDirection(description) === 'rtl';
|
const isDescriptionRTL = getDirection(description) === 'rtl';
|
||||||
|
|
||||||
if (giftBadge.state === GiftBadgeStates.Unopened && !isDescriptionRTL) {
|
if (giftBadge.state === GiftBadgeStates.Unopened && !isDescriptionRTL) {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Collection, Model } from 'backbone';
|
||||||
import type { MessageModel } from '../models/messages';
|
import type { MessageModel } from '../models/messages';
|
||||||
import { ReadStatus } from '../messages/MessageReadStatus';
|
import { ReadStatus } from '../messages/MessageReadStatus';
|
||||||
import { markViewed } from '../services/MessageUpdater';
|
import { markViewed } from '../services/MessageUpdater';
|
||||||
import { isIncoming, isStory } from '../state/selectors/message';
|
import { isIncoming } from '../state/selectors/message';
|
||||||
import { notificationService } from '../services/notifications';
|
import { notificationService } from '../services/notifications';
|
||||||
import * as log from '../logging/log';
|
import * as log from '../logging/log';
|
||||||
import { GiftBadgeStates } from '../components/conversation/Message';
|
import { GiftBadgeStates } from '../components/conversation/Message';
|
||||||
|
@ -68,10 +68,7 @@ export class ViewSyncs extends Collection {
|
||||||
uuid: item.sourceUuid,
|
uuid: item.sourceUuid,
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return senderId === sync.get('senderId');
|
||||||
(isIncoming(item) || isStory(item)) &&
|
|
||||||
senderId === sync.get('senderId')
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue