Notification: handle "creator_comment" #6069
2 changed files with 5 additions and 1 deletions
|
@ -31,7 +31,9 @@ export default function Notification(props: Props) {
|
||||||
const { push } = useHistory();
|
const { push } = useHistory();
|
||||||
const { notification_rule, notification_parameters, is_read, id } = notification;
|
const { notification_rule, notification_parameters, is_read, id } = notification;
|
||||||
const isCommentNotification =
|
const isCommentNotification =
|
||||||
notification_rule === NOTIFICATIONS.NOTIFICATION_COMMENT || notification_rule === NOTIFICATIONS.NOTIFICATION_REPLY;
|
notification_rule === NOTIFICATIONS.NOTIFICATION_COMMENT ||
|
||||||
|
notification_rule === NOTIFICATIONS.NOTIFICATION_REPLY ||
|
||||||
|
notification_rule === NOTIFICATIONS.CREATOR_COMMENT;
|
||||||
const commentText = isCommentNotification && notification_parameters.dynamic.comment;
|
const commentText = isCommentNotification && notification_parameters.dynamic.comment;
|
||||||
const channelUrl =
|
const channelUrl =
|
||||||
(notification_rule === NOTIFICATIONS.NEW_CONTENT && notification.notification_parameters.dynamic.channel_url) || '';
|
(notification_rule === NOTIFICATIONS.NEW_CONTENT && notification.notification_parameters.dynamic.channel_url) || '';
|
||||||
|
@ -70,6 +72,7 @@ export default function Notification(props: Props) {
|
||||||
icon = <Icon icon={ICONS.SUBSCRIBE} sectionIcon />;
|
icon = <Icon icon={ICONS.SUBSCRIBE} sectionIcon />;
|
||||||
break;
|
break;
|
||||||
case NOTIFICATIONS.NOTIFICATION_COMMENT:
|
case NOTIFICATIONS.NOTIFICATION_COMMENT:
|
||||||
|
case NOTIFICATIONS.CREATOR_COMMENT:
|
||||||
icon = <ChannelThumbnail small uri={notification_parameters.dynamic.comment_author} />;
|
icon = <ChannelThumbnail small uri={notification_parameters.dynamic.comment_author} />;
|
||||||
break;
|
break;
|
||||||
case NOTIFICATIONS.NOTIFICATION_REPLY:
|
case NOTIFICATIONS.NOTIFICATION_REPLY:
|
||||||
|
|
|
@ -6,6 +6,7 @@ export const DAILY_WATCH_AVAILABLE = 'daily_watch_available';
|
||||||
export const DAILY_WATCH_REMIND = 'daily_watch_remind';
|
export const DAILY_WATCH_REMIND = 'daily_watch_remind';
|
||||||
export const NEW_CONTENT = 'new_content';
|
export const NEW_CONTENT = 'new_content';
|
||||||
export const NEW_LIVESTREAM = 'new_livestream';
|
export const NEW_LIVESTREAM = 'new_livestream';
|
||||||
|
export const CREATOR_COMMENT = 'creator_comment';
|
||||||
|
|
||||||
export const NOTIFICATION_NAME_ALL = 'All';
|
export const NOTIFICATION_NAME_ALL = 'All';
|
||||||
export const NOTIFICATION_RULE_COMMENTS = 'comments';
|
export const NOTIFICATION_RULE_COMMENTS = 'comments';
|
||||||
|
|
Loading…
Reference in a new issue