]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #7858 from annando/diaspora-date
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 22 Nov 2019 20:36:27 +0000 (15:36 -0500)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2019 20:36:27 +0000 (15:36 -0500)
Don't use the creation date when transmitting to Diaspora

src/Module/Diaspora/Fetch.php
src/Protocol/Diaspora.php

index 6e3469c292c279366b973923d8c3259be9926a20..0efe641ba6828310a3494213bd25b5f2407d5504 100644 (file)
@@ -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]];
index 7c583dc280947ad6cafa5ea8fa7b6e46f8e6f480..f341f217c40ec47f2dde38d231f97f70a4f4bc57 100644 (file)
@@ -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