From: gudzpoz Date: Sun, 12 Nov 2023 14:17:37 +0000 (+0800) Subject: Extract emojis into mastodon api only for local posts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=917b801eb68eb3d382bb3752e117b57dbe07d034;p=friendica.git Extract emojis into mastodon api only for local posts --- diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index aaaa8d3d94..4cdc8a78fc 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -288,8 +288,11 @@ class Status extends BaseFactory } } - $used_smilies = Smilies::extractUsedSmilies($item['body'] ?: $item['raw-body']); - $emojis = $this->mstdnEmojiFactory->createCollectionFromArray($used_smilies)->getArrayCopy(true); + $emojis = null; + if (DI::baseUrl()->isLocalUrl($item['uri'])) { + $used_smilies = Smilies::extractUsedSmilies($item['body'] ?: $item['raw-body']); + $emojis = $this->mstdnEmojiFactory->createCollectionFromArray($used_smilies)->getArrayCopy(true); + } if ($is_reshare) { try {