Bugfix. Single emoji messages don't display larger when restored from cache
This commit is contained in:
parent
7511d8c35e
commit
2834e8d678
@ -161,11 +161,13 @@ function convert (unicode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
u.isSingleEmoji = function (str) {
|
u.isSingleEmoji = function (str) {
|
||||||
|
str = str.trim();
|
||||||
if (!str || (str.length > 2 && !str.startsWith(':'))) {
|
if (!str || (str.length > 2 && !str.startsWith(':'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const result = _.flow(u.shortnameToUnicode, twemoji.default.parse)(str)
|
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) {
|
u.shortnameToUnicode = function (str) {
|
||||||
|
Loading…
Reference in New Issue
Block a user