From 83266b87af711b18ef9285ec5f7b4221958b2012 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 11 Jan 2021 20:14:17 +0000 Subject: [PATCH] Create plink if missing --- src/Protocol/Diaspora.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index a9025c5a4c..269d623868 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -1265,7 +1265,7 @@ class Diaspora * @throws \Friendica\Network\HTTPException\InternalServerErrorException * @throws \ImagickException */ - private static function plink($addr, $guid, $parent_guid = '') + private static function plink(string $addr, string $guid, string $parent_guid = '') { $contact = Contact::getByURL($addr); if (empty($contact)) { @@ -2436,6 +2436,10 @@ class Diaspora return false; } + if (empty($original_item['plink'])) { + $original_item['plink'] = self::plink($root_author, $root_guid); + } + $datarray = []; $datarray["uid"] = $importer["uid"];