Use item created date if edited doesn't exist in Protocol\Diaspora::buildStatus

- Addresses https://github.com/friendica/friendica/issues/6918#issuecomment-502347886
This commit is contained in:
Hypolite Petovan 2019-06-15 17:11:01 -04:00
parent da114445c9
commit 75894fa275

View File

@ -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"]))) {