diff --git a/src/Object/Api/Mastodon/Account.php b/src/Object/Api/Mastodon/Account.php index 517fb152ba..5bd2743b9e 100644 --- a/src/Object/Api/Mastodon/Account.php +++ b/src/Object/Api/Mastodon/Account.php @@ -103,7 +103,13 @@ class Account extends BaseEntity $this->bot = ($publicContact['contact-type'] == Contact::TYPE_NEWS); $this->discoverable = !$publicContact['unsearchable']; $this->group = ($publicContact['contact-type'] == Contact::TYPE_COMMUNITY); - $this->created_at = DateTimeFormat::utc($publicContact['created'], DateTimeFormat::ATOM); + + $publicContactCreated = $publicContact['created'] ?: DBA::NULL_DATETIME; + $userContactCreated = $userContact['created'] ?? DBA::NULL_DATETIME; + + $created = $userContactCreated < $publicContactCreated && ($userContactCreated != DBA::NULL_DATETIME) ? $userContactCreated : $publicContactCreated; + $this->created_at = DateTimeFormat::utc($created, DateTimeFormat::ATOM); + $this->note = BBCode::convert($publicContact['about'], false); $this->url = $publicContact['url']; $this->avatar = $userContact['avatar'] ?? $publicContact['avatar'];