fix(tiktok): default content_posting_method to DIRECT_POST#1687
Open
giladresisi wants to merge 1 commit into
Open
fix(tiktok): default content_posting_method to DIRECT_POST#1687giladresisi wants to merge 1 commit into
giladresisi wants to merge 1 commit into
Conversation
The agent (chat / MCP) had to pick content_posting_method with no guidance: the setting is a bare required enum with no description or default, and TikTok's agent rules said nothing about it. For a video post "UPLOAD" reads like the obvious choice - but UPLOAD does not publish, it only drops the video into the user's TikTok app inbox, where it must be completed manually within ~24h or it is discarded. Users hit this as "post marked successful but never published". Two layers: - TikTok @rules text now tells the agent to use DIRECT_POST unless the user explicitly asks to review/edit in the app first, and explains that UPLOAD does not publish. - A PROVIDER_SETTINGS_DEFAULTS map + buildSettings() helper fills content_posting_method with DIRECT_POST when the key is omitted, in both validation and creation, so an omitted value can never land on UPLOAD by accident. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Contribution-checker quality warning Heuristics that flagged:
If this is a genuine contribution, please add detail to your PR description and tighten the diff scope before reviewers look at it. |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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.
Problem
Scheduled TikTok posts were being marked successful in Postiz and Temporal but never published. The
postSocialactivity returnedpostId: "missing"with atiktok.com/messagesrelease URL.Root cause: the post had
content_posting_method: "UPLOAD"instead ofDIRECT_POST.UPLOADdoes not publish — TikTok's API delivers the video to the account's app inbox, where the user must manually complete it within ~24h or it's discarded. This is TikTok'sSEND_TO_USER_INBOXterminal status, which we (correctly) treat as a successful upload.Why the agent chose
UPLOAD: the chat/MCP agent had to supplycontent_posting_methodwith no guidance — it's a bare required enum ('DIRECT_POST' | 'UPLOAD') with no description or default, and TikTok's agent@Rulessaid nothing about it. For a video post, "UPLOAD" reads like the obvious choice. The user never asked for it; the model guessed.Fix (two layers)
@Rulesguidance (tiktok.provider.ts): the agent is now told to useDIRECT_POSTunless the user explicitly asks to review/edit inside the TikTok app first, and thatUPLOADdoes not publish.integration.schedule.post.ts): aPROVIDER_SETTINGS_DEFAULTSmap +buildSettings()helper fillscontent_posting_methodwithDIRECT_POSTwhen the key is omitted — applied in both the validation and creation paths — so an omitted value can never land onUPLOADby accident. The default map is TikTok-only; all other providers reduce to the exact prior behavior.Testing
content_posting_methodnow yieldsDIRECT_POST.tiktokentry).Notes
First of two related changes. A follow-up feature branch (agent list/update of scheduled posts) stacks on this one and will be opened as a separate PR.
🤖 Generated with Claude Code