mirror of https://github.com/vector-im/riot-web
Look for emoji in the body that will be displayed
Fixes https://github.com/vector-im/element-web/issues/16013pull/21833/head
parent
e14050a19f
commit
3907826cd6
|
@ -438,13 +438,14 @@ export function bodyToHtml(content: IContent, highlights: string[], opts: IOpts
|
||||||
delete sanitizeParams.textFilter;
|
delete sanitizeParams.textFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const contentBody = isDisplayedWithHtml ? safeBody : strippedBody;
|
||||||
if (opts.returnString) {
|
if (opts.returnString) {
|
||||||
return isDisplayedWithHtml ? safeBody : strippedBody;
|
return contentBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
let emojiBody = false;
|
let emojiBody = false;
|
||||||
if (!opts.disableBigEmoji && bodyHasEmoji) {
|
if (!opts.disableBigEmoji && bodyHasEmoji) {
|
||||||
let contentBodyTrimmed = strippedBody !== undefined ? strippedBody.trim() : '';
|
let contentBodyTrimmed = contentBody !== undefined ? contentBody.trim() : '';
|
||||||
|
|
||||||
// Ignore spaces in body text. Emojis with spaces in between should
|
// Ignore spaces in body text. Emojis with spaces in between should
|
||||||
// still be counted as purely emoji messages.
|
// still be counted as purely emoji messages.
|
||||||
|
|
Loading…
Reference in New Issue