From 75894fa275f6728b0a4c54a2555fe76f4df84073 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 15 Jun 2019 17:11:01 -0400 Subject: [PATCH] Use item created date if edited doesn't exist in Protocol\Diaspora::buildStatus - Addresses https://github.com/friendica/friendica/issues/6918#issuecomment-502347886 --- src/Protocol/Diaspora.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 751033e96..f7d94256e 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3543,7 +3543,7 @@ class Diaspora $public = ($item["private"] ? "false" : "true"); $created = DateTimeFormat::utc($item["created"], DateTimeFormat::ATOM); - $edited = DateTimeFormat::utc($item["edited"], DateTimeFormat::ATOM); + $edited = DateTimeFormat::utc($item["edited"] ?? $item["created"], DateTimeFormat::ATOM); // Detect a share element and do a reshare if (!$item['private'] && ($ret = self::isReshare($item["body"]))) {