Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/containers/message/Reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,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 (
<View style={styles.authorContainer}>
{attachment.author_name ? <Text style={[styles.author, { color: themes[theme].bodyText }]}>{attachment.author_name}</Text> : null}
Expand Down
10 changes: 8 additions & 2 deletions storybook/stories/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,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'
}]}
/>
<Message
Expand All @@ -435,7 +436,8 @@ export default ({ theme }) => {
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'
}]}
/>

Expand Down Expand Up @@ -687,6 +689,7 @@ export default ({ theme }) => {
ts: date,
timeFormat: 'LT',
text: 'Custom fields',
message_link: 'http:///example.com',
fields: [{
title: 'Field 1',
value: 'Value 1'
Expand Down Expand Up @@ -714,6 +717,7 @@ export default ({ theme }) => {
ts: date,
timeFormat: 'LT',
text: 'Custom fields',
message_link: 'http:///example.com',
fields: [{
title: 'Field 1',
value: 'Value 1',
Expand All @@ -728,6 +732,7 @@ export default ({ theme }) => {
ts: date,
timeFormat: 'LT',
text: 'Custom fields 2',
message_link: 'http:///example.com',
fields: [{
title: 'Field 1',
value: 'Value 1',
Expand Down Expand Up @@ -774,6 +779,7 @@ export default ({ theme }) => {
author_name: 'rocket.cat',
ts: date,
timeFormat: 'LT',
message_link: 'http:///example.com',
text: 'First message'
}]}
/>
Expand Down