feat: tiktok default parameters

This commit is contained in:
Nevo David 2025-06-29 18:43:09 +07:00
parent 8fa1d6c9eb
commit 785b04b93d
1 changed files with 7 additions and 7 deletions

View File

@ -256,18 +256,18 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
...(firstPost.settings.content_posting_method === 'DIRECT_POST'
...((firstPost?.settings?.content_posting_method || 'DIRECT_POST') === 'DIRECT_POST'
? {
post_info: {
title: firstPost.message,
privacy_level: firstPost.settings.privacy_level,
disable_duet: !firstPost.settings.duet,
disable_comment: !firstPost.settings.comment,
disable_stitch: !firstPost.settings.stitch,
privacy_level: firstPost.settings.privacy_level || 'PUBLIC_TO_EVERYONE',
disable_duet: !firstPost.settings.duet || false,
disable_comment: !firstPost.settings.comment || false,
disable_stitch: !firstPost.settings.stitch || false,
brand_content_toggle:
firstPost.settings.brand_content_toggle,
firstPost.settings.brand_content_toggle || false,
brand_organic_toggle:
firstPost.settings.brand_organic_toggle,
firstPost.settings.brand_organic_toggle || false,
...((firstPost?.media?.[0]?.url?.indexOf('mp4') || -1) ===
-1
? {