From 7d4fa2886b322af6d7cc2fad3e377c9156029f69 Mon Sep 17 00:00:00 2001 From: Jill Stingray Date: Fri, 26 Jun 2020 09:30:15 +0000 Subject: [PATCH] Use twemoji --- Web/Models/Entities/Traits/TRichText.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Web/Models/Entities/Traits/TRichText.php b/Web/Models/Entities/Traits/TRichText.php index d4a4acbc..8026506a 100644 --- a/Web/Models/Entities/Traits/TRichText.php +++ b/Web/Models/Entities/Traits/TRichText.php @@ -8,15 +8,15 @@ trait TRichText $emojis = \Emoji\detect_emoji($text); $replaced = []; # OVK-113 foreach($emojis as $emoji) { - $point = strtolower($emoji["hex_str"]); + $point = explode("-", strtolower($emoji["hex_str"]))[0]; if(in_array($point, $replaced)) continue; else $replaced[] = $point; - $image = "https://cdn.jsdelivr.net/npm/emojione-assets@4.5.0/png/32/$point.png"; + $image = "https://abs.twimg.com/emoji/v2/72x72/$point.png"; $image = "