]> git.mxchange.org Git - friendica.git/commitdiff
Fix edited messages for Diaspora
authorMichael <heluecht@pirati.ca>
Thu, 30 May 2019 18:56:31 +0000 (18:56 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 30 May 2019 18:56:31 +0000 (18:56 +0000)
src/Protocol/Diaspora.php

index 98b0d4d3ded25040de91d757c8e9737ec7a4deb8..818f078bb103103c7161a1063dd2057d169fd8e4 100644 (file)
@@ -3562,6 +3562,7 @@ class Diaspora
                $public = ($item["private"] ? "false" : "true");
 
                $created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
+               $edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
 
                // Detect a share element and do a reshare
                if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {
@@ -3616,6 +3617,7 @@ class Diaspora
                        $message = ["author" => $myaddr,
                                        "guid" => $item["guid"],
                                        "created_at" => $created,
+                                       "edited_at" => $edited,
                                        "public" => $public,
                                        "text" => $body,
                                        "provider_display_name" => $item["app"],
@@ -3794,11 +3796,13 @@ class Diaspora
 
                $text = html_entity_decode(BBCode::toMarkdown($body));
                $created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM);
+               $edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM);
 
                $comment = [
                        "author"      => self::myHandle($owner),
                        "guid"        => $item["guid"],
                        "created_at"  => $created,
+                       "edited_at"   => $edited,
                        "parent_guid" => $toplevel_item["guid"],
                        "text"        => $text,
                        "author_signature" => ""