mirror of
https://github.com/friendica/friendica
synced 2025-04-26 01:10:15 +00:00
Check more fields for the language
This commit is contained in:
parent
8968c63fcc
commit
0c82974986
4 changed files with 23 additions and 20 deletions
|
@ -1652,7 +1652,19 @@ class Processor
|
|||
$attributed_to = JsonLD::fetchElement($activity['as:object'], 'as:attributedTo', '@id');
|
||||
$authorid = Contact::getIdForURL($attributed_to);
|
||||
|
||||
$body = HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value') ?? '');
|
||||
$content = JsonLD::fetchElement($activity['as:object'], 'as:name', '@value') ?? '';
|
||||
$content .= ' ' . JsonLD::fetchElement($activity['as:object'], 'as:summary', '@value') ?? '';
|
||||
$content .= ' ' . HTML::toBBCode(JsonLD::fetchElement($activity['as:object'], 'as:content', '@value') ?? '');
|
||||
|
||||
$attachments = JsonLD::fetchElementArray($activity['as:object'], 'as:attachment') ?? [];
|
||||
foreach ($attachments as $media) {
|
||||
if (!empty($media['as:summary'])) {
|
||||
$content .= ' ' . JsonLD::fetchElement($media, 'as:summary', '@value');
|
||||
}
|
||||
if (!empty($media['as:name'])) {
|
||||
$content .= ' ' . JsonLD::fetchElement($media, 'as:name', '@value');
|
||||
}
|
||||
}
|
||||
|
||||
$messageTags = [];
|
||||
$tags = Receiver::processTags(JsonLD::fetchElementArray($activity['as:object'], 'as:tag') ?? []);
|
||||
|
@ -1665,7 +1677,7 @@ class Processor
|
|||
}
|
||||
}
|
||||
|
||||
return Relay::isSolicitedPost($messageTags, $body, $authorid, $id, Protocol::ACTIVITYPUB, $activity['thread-completion'] ?? 0);
|
||||
return Relay::isSolicitedPost($messageTags, $content, $authorid, $id, Protocol::ACTIVITYPUB, $activity['thread-completion'] ?? 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue