From b24dd53d988f6c59c34588c3862ea83adca17362 Mon Sep 17 00:00:00 2001 From: Ali Hesari Date: Sun, 20 Sep 2026 17:35:04 +0200 Subject: [PATCH] feat(inbox): carry a comment's moderation status and an account's reconnect flag --- CHANGELOG.md | 4 ++++ src/main/java/com/fopost/sdk/model/InboxAccount.java | 5 ++++- src/main/java/com/fopost/sdk/model/InboxItem.java | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2fa27e..94a5975 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ All notable changes to this project are documented here. The format follows ### Added +- `InboxItem.moderationStatus` carries the platform's own state for a comment + (`published`, `held`, `spam`, `rejected`), and `InboxAccount.reconnectRequired` + flags an account connected before the inbox asked for a permission it needs. + - `broadcasts()`: one message into every conversation the workspace already has with a segment of its contacts. `list`, `get`, `create`, `update`, `delete`, `send`, `cancel` and `recipients`. Reading needs the `inbox` scope; `send` and `cancel` also need `publish`. diff --git a/src/main/java/com/fopost/sdk/model/InboxAccount.java b/src/main/java/com/fopost/sdk/model/InboxAccount.java index 5d7dce4..2236d8e 100644 --- a/src/main/java/com/fopost/sdk/model/InboxAccount.java +++ b/src/main/java/com/fopost/sdk/model/InboxAccount.java @@ -3,6 +3,8 @@ /** * A connected account, flagged with whether comments and DMs can be read for it yet. * {@code canStartConversation} means a new DM can be opened from it by handle. + * {@code reconnectRequired} means the grant predates a permission the inbox read needs, so the + * account is not polled until someone reconnects it. */ public record InboxAccount( String id, @@ -15,4 +17,5 @@ public record InboxAccount( String pendingReason, Boolean dmSupported, String dmPendingReason, - Boolean canStartConversation) {} + Boolean canStartConversation, + Boolean reconnectRequired) {} diff --git a/src/main/java/com/fopost/sdk/model/InboxItem.java b/src/main/java/com/fopost/sdk/model/InboxItem.java index 7a37c04..3f5660a 100644 --- a/src/main/java/com/fopost/sdk/model/InboxItem.java +++ b/src/main/java/com/fopost/sdk/model/InboxItem.java @@ -12,6 +12,8 @@ * comment someone left or our own reply; {@code canPin} and {@code canEdit} are our own comments * only; {@code canPrivateReply} means a DM can be opened from it with * {@code StartConversationParams.privateReply}. {@code reaction} is our reaction on a DM. + * {@code moderationStatus} is the platform's own state for a comment: published, held, spam or + * rejected, and null where the platform does not report one. */ public record InboxItem( String id, @@ -49,6 +51,7 @@ public record InboxItem( Boolean canSendMedia, Boolean canQuickReply, Boolean canPrivateReply, + String moderationStatus, PostRef post, InboxPostContext postContext, InboxAccountRef account) {}