[FIX] 👍 emoji (#1202)

This commit is contained in:
Djorkaeff Alexandre 2019-09-24 17:48:20 -03:00 committed by Diego Mello
parent 94346634ae
commit e86205c74e
3 changed files with 5 additions and 40 deletions

View File

@ -30,7 +30,7 @@
"commonmark-react-renderer": "git+https://github.com/RocketChat/commonmark-react-renderer.git", "commonmark-react-renderer": "git+https://github.com/RocketChat/commonmark-react-renderer.git",
"deep-equal": "^1.0.1", "deep-equal": "^1.0.1",
"ejson": "2.2.0", "ejson": "2.2.0",
"emoji-toolkit": "^5.0.4", "emoji-toolkit": "^5.0.5",
"expo-av": "^6.0.0", "expo-av": "^6.0.0",
"expo-file-system": "^6.0.2", "expo-file-system": "^6.0.2",
"expo-haptics": "6.0.0", "expo-haptics": "6.0.0",

View File

@ -1,35 +0,0 @@
diff --git a/node_modules/emoji-toolkit/lib/js/joypixels.js b/node_modules/emoji-toolkit/lib/js/joypixels.js
index 8e696e6..f2998b9 100644
--- a/node_modules/emoji-toolkit/lib/js/joypixels.js
+++ b/node_modules/emoji-toolkit/lib/js/joypixels.js
@@ -111,6 +111,7 @@
':L':'1f615',
'=L':'1f615',
':P':'1f61b',
+ ':p':'1f61b',
'=P':'1f61b',
':b':'1f61b',
':O':'1f62e',
@@ -245,12 +246,19 @@
// replace regular shortnames first
var unicode,fname;
str = str.replace(ns.regShortNames, function(shortname) {
- if( (typeof shortname === 'undefined') || (shortname === '') || (!(shortname in ns.emojiList)) ) {
- // if the shortname doesnt exist just return the entire matchhju
+ if( (typeof shortname === 'undefined') || (shortname === '') || (ns.shortnames.indexOf(shortname) === -1) ) {
+ // if the shortname doesnt exist just return the entire match
return shortname;
}
+ if (!ns.emojiList[shortname]) {
+ for ( var emoji in ns.emojiList ) {
+ if (!ns.emojiList.hasOwnProperty(emoji) || (emoji === '')) continue;
+ if (ns.emojiList[emoji].shortnames.indexOf(shortname) === -1) continue;
+ shortname = emoji;
+ break;
+ }
+ }
unicode = ns.emojiList[shortname].uc_full.toUpperCase();
- fname = ns.emojiList[shortname].uc_base;
return ns.convert(unicode);
});

View File

@ -3513,10 +3513,10 @@ emoji-regex@^7.0.1, emoji-regex@^7.0.2:
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
emoji-toolkit@^5.0.4: emoji-toolkit@^5.0.5:
version "5.0.4" version "5.0.5"
resolved "https://registry.yarnpkg.com/emoji-toolkit/-/emoji-toolkit-5.0.4.tgz#73e6902b73894aa1899c7f148d3801eb157455a6" resolved "https://registry.yarnpkg.com/emoji-toolkit/-/emoji-toolkit-5.0.5.tgz#83f92fc5e78031e046f9fe861c804effdc4380ee"
integrity sha512-ZZfVQkWQ+1v3q3EdeYSVOQHVg/idvOhARoG4G+hPesN1i00vSeSgI+PUrsRRQSdrET7/Fe9Jr0n7iFbLlY5dKA== integrity sha512-I57/yzEll8mIczqUCv2DaBhF61eBKtOwUN/7bxFPjwtwoVB9FnkRoabQRLZS6+KeSZNscw0av8o/N7tfy59PUg==
emotion-theming@^10.0.9: emotion-theming@^10.0.9:
version "10.0.14" version "10.0.14"