]> git.mxchange.org Git - friendica.git/commitdiff
Create plink if missing
authorMichael <heluecht@pirati.ca>
Mon, 11 Jan 2021 20:14:17 +0000 (20:14 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 11 Jan 2021 20:14:17 +0000 (20:14 +0000)
src/Protocol/Diaspora.php

index a9025c5a4c5dd36c85985f0a9cfd9fc1ebe24f2a..269d62386887bd1580043de2d6e519f894d6c068 100644 (file)
@@ -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"];