Extract emojis into mastodon api only for local posts

This commit is contained in:
gudzpoz 2023-11-12 22:17:37 +08:00
parent 9bf7529dda
commit 917b801eb6

View file

@ -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 {