From bef16702c77dc1ac69bf362d0f7420139252e365 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 25 Dec 2019 05:42:46 -0500 Subject: [PATCH] Add missing fields to Mastodon API Account entity --- src/Api/Mastodon/Account.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Api/Mastodon/Account.php b/src/Api/Mastodon/Account.php index ca6efcb573..0a86be7e7b 100644 --- a/src/Api/Mastodon/Account.php +++ b/src/Api/Mastodon/Account.php @@ -52,6 +52,12 @@ class Account var $fields = null; /** @var bool|null */ var $bot = null; + /** @var bool */ + var $group; + /** @var bool */ + var $discoverable; + /** @var string|null (Datetime) */ + var $last_status_at = null; /** * Creates an account record from a public contact record. Expects all contact table fields to be set. @@ -85,6 +91,9 @@ class Account // No metadata fields in Friendica $account->fields = []; $account->bot = ($publicContact['contact-type'] == Contact::TYPE_NEWS); + $account->group = ($publicContact['contact-type'] == Contact::TYPE_COMMUNITY); + $account->discoverable = !$publicContact['unsearchable']; + $account->last_status_at = !empty($publicContact['last-item']) ? DateTimeFormat::utc($publicContact['last-item'], DateTimeFormat::ATOM) : null; return $account; } -- 2.39.5