From: Michael Date: Mon, 26 Jun 2023 19:44:14 +0000 (+0000) Subject: Issue 13221: Diaspora posts are now stored correctly X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cab469621d173015ade7846344f5051b600d640d;p=friendica.git Issue 13221: Diaspora posts are now stored correctly --- diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index abe56cb9a1..dd6c2115b5 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2654,7 +2654,7 @@ class Diaspora $datarray = [ 'guid' => $guid, - 'uri-id' => ItemURI::insert(['uri' => $guid, 'guid' => $guid]), + 'plink' => self::plink($author, $guid), 'uid' => $importer['uid'], 'contact-id' => $contact['id'], 'network' => Protocol::DIASPORA, @@ -2672,9 +2672,12 @@ class Diaspora 'post-type' => Item::PT_NOTE, ]; - $datarray['guid'] = $guid; - $datarray['uri'] = $datarray['thr-parent'] = self::getUriFromGuid($guid, $author); - $datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]); + $datarray['uri'] = $datarray['thr-parent'] = self::getUriFromGuid($guid, $author); + $datarray['uri-id'] = ItemURI::insert(['uri' => $datarray['uri'], 'guid' => $datarray['guid']]); + $datarray['owner-link'] = $datarray['author-link']; + $datarray['owner-id'] = $datarray['author-id']; + + $datarray = self::setDirection($datarray, $direction); // Attach embedded pictures to the body if ($data->photo) { @@ -2709,7 +2712,6 @@ class Diaspora $datarray['app'] = $provider_display_name; } - $datarray['plink'] = self::plink($author, $guid); $datarray['changed'] = $datarray['created'] = $datarray['edited'] = $created_at; if (isset($address['address'])) {