diff --git a/app/containers/message/Reply.js b/app/containers/message/Reply.js index 698eec94..4acecbc4 100644 --- a/app/containers/message/Reply.js +++ b/app/containers/message/Reply.js @@ -73,7 +73,7 @@ const Title = React.memo(({ attachment, timeFormat, theme }) => { if (!attachment.author_name) { return null; } - const time = attachment.ts ? moment(attachment.ts).format(timeFormat) : null; + const time = attachment.message_link && attachment.ts ? moment(attachment.ts).format(timeFormat) : null; return ( {attachment.author_name ? {attachment.author_name} : null} diff --git a/storybook/stories/Message.js b/storybook/stories/Message.js index f33f69cf..5fc6663d 100644 --- a/storybook/stories/Message.js +++ b/storybook/stories/Message.js @@ -440,7 +440,8 @@ export default ({ theme }) => { author_name: 'I\'m a very long long title and I\'ll break', ts: date, timeFormat: 'LT', - text: 'How are you?' + text: 'How are you?', + message_link: 'http:///example.com' }]} /> { author_name: 'rocket.cat', ts: date, timeFormat: 'LT', - text: 'How are you? :nyan_rocket:' + text: 'How are you? :nyan_rocket:', + message_link: 'http:///example.com' }]} /> @@ -702,6 +704,7 @@ export default ({ theme }) => { ts: date, timeFormat: 'LT', text: 'Custom fields', + message_link: 'http:///example.com', fields: [{ title: 'Field 1', value: 'Value 1' @@ -729,6 +732,7 @@ export default ({ theme }) => { ts: date, timeFormat: 'LT', text: 'Custom fields', + message_link: 'http:///example.com', fields: [{ title: 'Field 1', value: 'Value 1', @@ -743,6 +747,7 @@ export default ({ theme }) => { ts: date, timeFormat: 'LT', text: 'Custom fields 2', + message_link: 'http:///example.com', fields: [{ title: 'Field 1', value: 'Value 1', @@ -833,6 +838,7 @@ export default ({ theme }) => { author_name: 'rocket.cat', ts: date, timeFormat: 'LT', + message_link: 'http:///example.com', text: 'First message' }]} />