3 * @copyright Copyright (C) 2010-2023, the Friendica project
5 * @license GNU AGPL version 3 or any later version
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Affero General Public License as
9 * published by the Free Software Foundation, either version 3 of the
10 * License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Affero General Public License for more details.
17 * You should have received a copy of the GNU Affero General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 namespace Friendica\Object\Api\Mastodon\Status;
24 use Friendica\BaseDataTransferObject;
27 * Class FriendicaExtension
29 * Additional fields on Mastodon Statuses for storing Friendica specific data
31 * @see https://docs.joinmastodon.org/entities/status
33 class FriendicaExtension extends BaseDataTransferObject
38 /** @var string|null (Datetime) */
39 protected $changed_at;
41 /** @var string|null (Datetime) */
42 protected $commented_at;
44 /** @var string|null (Datetime) */
45 protected $received_at;
47 /** @var FriendicaDeliveryData */
48 protected $delivery_data;
50 protected $dislikes_count;
54 * Creates a status count object
56 * @param string $title
57 * @param string|null $changed_at
58 * @param string|null $commented_at
59 * @param string|null $edited_at
60 * @param string|null $received_at
61 * @param int $dislikes_count
62 * @param FriendicaDeliveryData $delivery_data
64 public function __construct(
67 ?string $commented_at,
70 FriendicaDeliveryData $delivery_data
72 $this->title = $title;
73 $this->changed_at = $changed_at;
74 $this->commented_at = $commented_at;
75 $this->received_at = $received_at;
76 $this->delivery_data = $delivery_data;
77 $this->dislikes_count = $dislikes_count;
81 * Returns the current changed_at string or null if not set
84 public function changedAt(): ?string
86 return $this->changed_at;
90 * Returns the current commented_at string or null if not set
93 public function commentedAt(): ?string
95 return $this->commented_at;
99 * Returns the current received_at string or null if not set
102 public function receivedAt(): ?string
104 return $this->received_at;