Bugfix. Single emoji messages don't display larger when restored from cache

This commit is contained in:
JC Brand 2019-05-28 15:38:55 +02:00
parent 7511d8c35e
commit 2834e8d678

View File

@ -161,11 +161,13 @@ function convert (unicode) {
}
u.isSingleEmoji = function (str) {
str = str.trim();
if (!str || (str.length > 2 && !str.startsWith(':'))) {
return;
}
const result = _.flow(u.shortnameToUnicode, twemoji.default.parse)(str)
return result.match(/<img class="emoji" draggable="false" alt=".*?" src=".*?\.png"\/>/);
const match = result.match(/<img class="emoji" draggable="false" alt=".*?" src=".*?\.png"\/>/);
return match && match.length === 1;
}
u.shortnameToUnicode = function (str) {