mirror of
https://github.com/friendica/friendica
synced 2025-04-27 07:50:10 +00:00
Switch to parsing compacted JSON data
This commit is contained in:
parent
f8b74033a4
commit
3a74f3364d
4 changed files with 226 additions and 114 deletions
|
@ -52,7 +52,7 @@ class Processor
|
|||
|
||||
$tag_text = '';
|
||||
foreach ($tags as $tag) {
|
||||
if (in_array($tag['type'], ['Mention', 'Hashtag'])) {
|
||||
if (in_array(defaults($tag, 'type', ''), ['Mention', 'Hashtag'])) {
|
||||
if (!empty($tag_text)) {
|
||||
$tag_text .= ',';
|
||||
}
|
||||
|
@ -210,9 +210,8 @@ class Processor
|
|||
|
||||
$item = self::constructAttachList($activity['attachments'], $item);
|
||||
|
||||
$source = JsonLD::fetchElement($activity, 'source', 'content', 'mediaType', 'text/bbcode');
|
||||
if (!empty($source)) {
|
||||
$item['body'] = $source;
|
||||
if (!empty($activity['source'])) {
|
||||
$item['body'] = $activity['source'];
|
||||
}
|
||||
|
||||
$item['protocol'] = Conversation::PARCEL_ACTIVITYPUB;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue