Improve data of shared posts

This commit is contained in:
Michael 2021-05-07 06:26:41 +00:00
parent 38d2b68558
commit 95f741c427
4 changed files with 37 additions and 4 deletions

View file

@ -21,7 +21,6 @@
namespace Friendica\Protocol\ActivityPub;
use Friendica\Content\PageInfo;
use Friendica\Content\Text\BBCode;
use Friendica\Content\Text\HTML;
use Friendica\Content\Text\Markdown;
@ -464,6 +463,7 @@ class Processor
if (!empty($activity['source'])) {
$item['body'] = $activity['source'];
$item['raw-body'] = $content;
$item['body'] = Item::improveSharedDataInBody($item);
} else {
if (empty($activity['directmessage']) && ($item['thr-parent'] != $item['uri']) && ($item['gravity'] == GRAVITY_COMMENT)) {
$item_private = !in_array(0, $activity['item_receiver']);

View file

@ -2245,6 +2245,8 @@ class DFRN
$item['uri-id'] = ItemURI::insert(['uri' => $item['uri'], 'guid' => $item['guid']]);
$item["body"] = Item::improveSharedDataInBody($item);
Tag::storeFromBody($item['uri-id'], $item["body"]);
// We store the data from "dfrn:diaspora_signature" in a different table, this is done in "Item::insert"
@ -2340,7 +2342,7 @@ class DFRN
return 403;
}
}
// Get the type of the item (Top level post, reply or remote reply)
$entrytype = self::getEntryType($importer, $item);