[FIX] Apply emojify on empty texts (#824)

This commit is contained in:
Diego Mello 2019-04-18 09:43:31 -03:00 committed by GitHub
parent fde8aea173
commit fb88d08f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,9 @@ export default class Markdown extends React.Component {
return null;
}
let m = formatText(msg);
if (m) {
m = emojify(m, { output: 'unicode' });
}
m = m.replace(/^\[([^\]]*)\]\(([^)]*)\)/, '').trim();
return (
<MarkdownRenderer

View File

@ -97,7 +97,7 @@ const Reply = ({
};
const renderTitle = () => {
if (!(attachment.author_icon || attachment.author_name || attachment.ts)) {
if (!attachment.author_name) {
return null;
}
return (

View File

@ -123,7 +123,9 @@ export class List extends React.PureComponent {
const thread = threads.find(t => t._id === item.tmid);
if (thread) {
let tmsg = thread.msg || (thread.attachments && thread.attachments.length && thread.attachments[0].title);
if (tmsg) {
tmsg = emojify(tmsg, { output: 'unicode' });
}
item = { ...item, tmsg };
}
}