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) */
47 /** @var string|null (Datetime) */
48 protected $received_at;
50 /** @var FriendicaDeliveryData */
51 protected $delivery_data;
53 protected $dislikes_count;
56 * Creates a status count object
58 * @param string $title
59 * @param int $dislikes_count
60 * @param FriendicaDeliveryData $delivery_data
62 public function __construct(string $title, ?string $changed_at, ?string $commented_at, ?string $edited_at, ?string $received_at,
63 int $dislikes_count, FriendicaDeliveryData $delivery_data)
65 $this->title = $title;
66 $this->changed_at = $changed_at;
67 $this->commented_at = $commented_at;
68 $this->edited_at = $edited_at;
69 $this->received_at = $received_at;
70 $this->delivery_data = $delivery_data;
71 $this->dislikes_count = $dislikes_count;
75 * Returns the current changed_at string or null if not set
78 public function changedAt(): ?string
80 return $this->changed_at;
84 * Returns the current commented_at string or null if not set
87 public function commentedAt(): ?string
89 return $this->commented_at;
93 * Returns the current edited_at string or null if not set
96 public function editedAt(): ?string
98 return $this->edited_at;
102 * Returns the current received_at string or null if not set
105 public function receivedAt(): ?string
107 return $this->received_at;