From a74b316b071c1d57576a81794eff202767ef1467 Mon Sep 17 00:00:00 2001 From: Ali Hesari Date: Sun, 20 Sep 2026 02:55:36 +0200 Subject: [PATCH] feat(inbox): carry a comment's moderation status and an account's reconnect flag --- src/Model/InboxAccount.php | 3 +++ src/Model/InboxItem.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/Model/InboxAccount.php b/src/Model/InboxAccount.php index f38c30a..68543fb 100644 --- a/src/Model/InboxAccount.php +++ b/src/Model/InboxAccount.php @@ -20,6 +20,8 @@ private function __construct( public readonly ?bool $dmSupported, public readonly ?string $dmPendingReason, public readonly ?bool $canStartConversation, + /** The grant predates a permission the inbox needs; reconnect once. */ + public readonly ?bool $reconnectRequired, ) { parent::__construct($raw); } @@ -41,6 +43,7 @@ public static function fromArray(mixed $data): static self::bool($data, 'dm_supported'), self::str($data, 'dm_pending_reason'), self::bool($data, 'can_start_conversation'), + self::bool($data, 'reconnect_required'), ); } } diff --git a/src/Model/InboxItem.php b/src/Model/InboxItem.php index e2fb718..ab21296 100644 --- a/src/Model/InboxItem.php +++ b/src/Model/InboxItem.php @@ -51,6 +51,8 @@ private function __construct( public readonly ?bool $canSendMedia, public readonly ?bool $canQuickReply, public readonly ?bool $canPrivateReply, + /** The platform's own state: published, held, spam or rejected. */ + public readonly ?string $moderationStatus, public readonly ?array $post, public readonly ?array $postContext, public readonly ?array $account, @@ -98,6 +100,7 @@ public static function fromArray(mixed $data): static self::bool($data, 'can_send_media'), self::bool($data, 'can_quick_reply'), self::bool($data, 'can_private_reply'), + self::str($data, 'moderation_status'), self::nested($data, 'post'), self::nested($data, 'post_context'), self::nested($data, 'account'),