From: Hypolite Petovan Date: Fri, 22 Nov 2019 20:36:27 +0000 (-0500) Subject: Merge pull request #7858 from annando/diaspora-date X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=20dc285f9dbba3865f07c61cc0a6e2044bcbe6a1;hp=7fac116d5e5805e1e8f0a7b940782a156ca2ce35;p=friendica.git Merge pull request #7858 from annando/diaspora-date Don't use the creation date when transmitting to Diaspora --- diff --git a/src/Module/Diaspora/Fetch.php b/src/Module/Diaspora/Fetch.php index 6e3469c292..0efe641ba6 100644 --- a/src/Module/Diaspora/Fetch.php +++ b/src/Module/Diaspora/Fetch.php @@ -31,7 +31,7 @@ class Fetch extends BaseModule // Fetch the item $fields = [ - 'uid', 'title', 'body', 'guid', 'contact-id', 'private', 'created', 'app', 'location', 'coord', 'network', + 'uid', 'title', 'body', 'guid', 'contact-id', 'private', 'created', 'received', 'app', 'location', 'coord', 'network', 'event-id', 'resource-id', 'author-link', 'author-avatar', 'author-name', 'plink', 'owner-link', 'attach' ]; $condition = ['wall' => true, 'private' => false, 'guid' => $guid, 'network' => [Protocol::DFRN, Protocol::DIASPORA]]; diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 7c583dc280..f341f217c4 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3565,8 +3565,7 @@ class Diaspora $myaddr = self::myHandle($owner); $public = ($item["private"] ? "false" : "true"); - - $created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM); + $created = DateTimeFormat::utc($item['received'], DateTimeFormat::ATOM); $edited = DateTimeFormat::utc($item["edited"] ?? $item["created"], DateTimeFormat::ATOM); // Detect a share element and do a reshare