feat(typefully): document link previews and add --hide-link-preview flag - #30
Merged
Merged
Conversation
The API now auto-fetches link-preview cards for LinkedIn, Threads, and Bluesky drafts. Document that behavior and add a --hide-link-preview flag to drafts:create/drafts:update to publish the URL as plain text. Suppression is limited to LinkedIn and Threads, matching the platforms where the Typefully editor offers the control; the flag errors when neither platform is targeted. On update it works without --text, and sanitizePostForPlatform now round-trips hide_link_preview for Threads as well as LinkedIn. Claude-Session: https://claude.ai/code/session_01BP9uEWsmTsBnJttG1DVq9G
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
The Typefully API now fetches link-preview metadata server-side for LinkedIn, Threads, and Bluesky drafts (typefully-backend#1674, HELP-881): when a post contains a URL, the published post gets a rich link card automatically — no skill change needed for that.
This PR documents that behavior and adds the one control users may want on top of it:
--hide-link-previewflag (alias--hide_link_preview) ondrafts:createanddrafts:updateto publish the URL as plain text with no card.--paid-partnership/--made-with-aiX-only flag pattern).drafts:update --hide-link-previewworks without--text: it preserves the draft's existing LinkedIn/Threads posts and just sets the flag.sanitizePostForPlatformnow round-tripshide_link_previewfor Threads as well as LinkedIn, so--appendflows don't drop it.Tests
npm run test:all— 120 passed, including 4 new tests: create applies the flag to LinkedIn/Threads but not Bluesky; create errors without an eligible platform; update hides the card without--text; update errors when the draft has no eligible posts.drafts:create --platform linkedin,threads,bluesky --hide-link-preview→ response showshide_link_preview: truefor LinkedIn/Threads,falsefor Bluesky.https://claude.ai/code/session_01BP9uEWsmTsBnJttG1DVq9G