Instead of sending HTML for any Entity, only send HTML for Links
Otherwise emoji messages are sent as HTML, needlessly
This commit is contained in:
parent
be045a6dc0
commit
5826b6f22a
1 changed files with 4 additions and 3 deletions
|
@ -620,12 +620,13 @@ export default class MessageComposerInput extends React.Component {
|
|||
});
|
||||
}
|
||||
if (!shouldSendHTML) {
|
||||
const hasAnEntity = blocks.some((block) => {
|
||||
const hasLink = blocks.some((block) => {
|
||||
return block.getCharacterList().filter((c) => {
|
||||
return c.getEntity();
|
||||
const entityKey = c.getEntity();
|
||||
return entityKey && Entity.get(entityKey).getType() === 'LINK';
|
||||
}).size > 0;
|
||||
});
|
||||
shouldSendHTML = hasAnEntity;
|
||||
shouldSendHTML = hasLink;
|
||||
}
|
||||
if (shouldSendHTML) {
|
||||
contentHTML = HtmlUtils.processHtmlForSending(
|
||||
|
|
Loading…
Reference in a new issue