mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-10 17:14:26 +02:00
Pass emojis in remote mastodon posts in mastodon api
This commit is contained in:
parent
e088bb722b
commit
2cb0027f56
3 changed files with 26 additions and 9 deletions
|
@ -292,6 +292,10 @@ class Status extends BaseFactory
|
|||
if (DI::baseUrl()->isLocalUrl($item['uri'])) {
|
||||
$used_smilies = Smilies::extractUsedSmilies($item['body'] ?: $item['raw-body']);
|
||||
$emojis = $this->mstdnEmojiFactory->createCollectionFromArray($used_smilies)->getArrayCopy(true);
|
||||
} else {
|
||||
if (preg_match_all("(\[emoji=(.*?)](.*?)\[/emoji])ism", $item['body'] ?: $item['raw-body'], $matches)) {
|
||||
$emojis = $this->mstdnEmojiFactory->createCollectionFromArray(array_combine($matches[2], $matches[1]), false)->getArrayCopy(true);
|
||||
}
|
||||
}
|
||||
|
||||
if ($is_reshare) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue