feat(typefully): add LinkedIn first comment support to drafts - #29
Open
frankdilo wants to merge 2 commits into
Open
feat(typefully): add LinkedIn first comment support to drafts#29frankdilo wants to merge 2 commits into
frankdilo wants to merge 2 commits into
Conversation
drafts:create and drafts:update accept --linkedin-first-comment <text> (aliases: --linkedin_first_comment, --first-comment, --first_comment), sent to API v2 as platforms.linkedin.settings.first_comment. On update, a literal null clears the comment and omitting the flag preserves it: the CLI re-sends the existing comment on text-only updates because the API clears LinkedIn settings when omitted. A settings-only update (flag without --text) re-sends the draft's existing LinkedIn posts, mirroring the X metadata-only update path.
The API now preserves the first comment when LinkedIn settings are omitted on PATCH (typefully-backend#1770), so drop the workaround that re-sent the existing comment on text-only updates. Only send settings when the flag is passed; this also avoids overwriting a comment changed concurrently in the web editor with a stale value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds LinkedIn first comment support to
drafts:createanddrafts:update— the common "link in the first comment" pattern. Pairs with the API v2 change in typefully/typefully-backend#1770.CLI behavior
--linkedin-first-comment <text>ondrafts:create/drafts:update(and thecreate-draft/update-draftaliases). Flag aliases:--linkedin_first_comment,--first-comment,--first_comment, with conflict detection when several are passed with different values.platforms.linkedin.settings.first_comment. LinkedIn-only: using it withoutlinkedinin the target platforms errors.nullclears the comment;settingswhen the flag is passed, and the API preserves the first comment when settings are omitted;--text) works as a settings-only update: the CLI re-sends the draft's existing LinkedIn posts, mirroring the X metadata-only update path.Docs & tests
SKILL.md: flags table, common actions row, LinkedIn-only flags pointer,last-updatedbump.references/platforms/linkedin.md: new "First comment" section.CHANGELOG.md: user-facing entry under 2026-07-10.tests/drafts.test.js(create payload, platform validation, settings-only update, settings omitted on text-only update, null clear, conflicting flags); full suite passes (122 tests).