mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
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
@ -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 New Issue
Block a user