From 1f88bb8beb8089080c2b0ccbf6526481f40cc9a0 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 9 Jul 2020 19:19:18 +0000 Subject: [PATCH] Fix the plink for reshared Diaspora posts --- src/Protocol/Diaspora.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index b579f92df0..de8fa21777 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -2603,7 +2603,7 @@ class Diaspora // Do we already have this item? $fields = ['body', 'title', 'attach', 'app', 'created', 'object-type', 'uri', 'guid', - 'author-name', 'author-link', 'author-avatar']; + 'author-name', 'author-link', 'author-avatar', 'plink']; $condition = ['guid' => $guid, 'visible' => true, 'deleted' => false, 'private' => [Item::PUBLIC, Item::UNLISTED]]; $item = Item::selectFirst($fields, $condition); @@ -2647,7 +2647,7 @@ class Diaspora if ($stored) { $fields = ['body', 'title', 'attach', 'app', 'created', 'object-type', 'uri', 'guid', - 'author-name', 'author-link', 'author-avatar']; + 'author-name', 'author-link', 'author-avatar', 'plink']; $condition = ['guid' => $guid, 'visible' => true, 'deleted' => false, 'private' => [Item::PUBLIC, Item::UNLISTED]]; $item = Item::selectFirst($fields, $condition); @@ -2749,8 +2749,6 @@ class Diaspora return false; } - $orig_url = DI::baseUrl()."/display/".$original_item["guid"]; - $datarray = []; $datarray["uid"] = $importer["uid"]; @@ -2779,7 +2777,7 @@ class Diaspora $original_item["author-name"], $original_item["author-link"], $original_item["author-avatar"], - $orig_url, + $original_item["plink"], $original_item["created"], $original_item["guid"] );