@@ -256,18 +256,18 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {
256256 Authorization : `Bearer ${ accessToken } ` ,
257257 } ,
258258 body : JSON . stringify ( {
259- ...( firstPost . settings . content_posting_method === 'DIRECT_POST'
259+ ...( ( firstPost ? .settings ? .content_posting_method || 'DIRECT_POST' ) === 'DIRECT_POST'
260260 ? {
261261 post_info : {
262262 title : firstPost . message ,
263- privacy_level : firstPost . settings . privacy_level ,
264- disable_duet : ! firstPost . settings . duet ,
265- disable_comment : ! firstPost . settings . comment ,
266- disable_stitch : ! firstPost . settings . stitch ,
263+ privacy_level : firstPost . settings . privacy_level || 'PUBLIC_TO_EVERYONE' ,
264+ disable_duet : ! firstPost . settings . duet || false ,
265+ disable_comment : ! firstPost . settings . comment || false ,
266+ disable_stitch : ! firstPost . settings . stitch || false ,
267267 brand_content_toggle :
268- firstPost . settings . brand_content_toggle ,
268+ firstPost . settings . brand_content_toggle || false ,
269269 brand_organic_toggle :
270- firstPost . settings . brand_organic_toggle ,
270+ firstPost . settings . brand_organic_toggle || false ,
271271 ...( ( firstPost ?. media ?. [ 0 ] ?. url ?. indexOf ( 'mp4' ) || - 1 ) ===
272272 - 1
273273 ? {
0 commit comments