From 75c2397ed1a509e70d872629671c156562147b40 Mon Sep 17 00:00:00 2001 From: blackle Date: Sat, 7 Jan 2017 18:16:14 -0500 Subject: [PATCH] Emojify display names in notifcations --- .../features/notifications/components/notification.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/components/features/notifications/components/notification.jsx b/app/assets/javascripts/components/features/notifications/components/notification.jsx index 37715dd05b..140ba9134e 100644 --- a/app/assets/javascripts/components/features/notifications/components/notification.jsx +++ b/app/assets/javascripts/components/features/notifications/components/notification.jsx @@ -4,6 +4,8 @@ import StatusContainer from '../../../containers/status_container'; import AccountContainer from '../../../containers/account_container'; import { FormattedMessage } from 'react-intl'; import Permalink from '../../../components/permalink'; +import emojify from '../../../emoji'; +import escapeTextContentForBrowser from 'react/lib/escapeTextContentForBrowser'; const messageStyle = { marginLeft: '68px', @@ -83,7 +85,8 @@ const Notification = React.createClass({ const { notification } = this.props; const account = notification.get('account'); const displayName = account.get('display_name').length > 0 ? account.get('display_name') : account.get('username'); - const link = {displayName}; + const displayNameHTML = { __html: emojify(escapeTextContentForBrowser(displayName)) }; + const link = ; switch(notification.get('type')) { case 'follow':