From ce94f9bcc455ebf59ef8765c00b108475a9f3afb Mon Sep 17 00:00:00 2001 From: Nevo David Date: Sun, 11 Jan 2026 14:57:08 +0700 Subject: [PATCH] fix: dont try to post of parent is not null --- apps/orchestrator/src/activities/post.activity.ts | 7 ++++++- .../integrations/social/instagram.standalone.provider.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/orchestrator/src/activities/post.activity.ts b/apps/orchestrator/src/activities/post.activity.ts index c4514ec5..71200476 100644 --- a/apps/orchestrator/src/activities/post.activity.ts +++ b/apps/orchestrator/src/activities/post.activity.ts @@ -83,7 +83,12 @@ export class PostActivity { @ActivityMethod() async getPostsList(orgId: string, postId: string) { - return this._postService.getPostsRecursively(postId, true, orgId); + const getPosts = await this._postService.getPostsRecursively(postId, true, orgId); + if (!getPosts || getPosts.length === 0 || getPosts[0].parentPostId) { + return []; + } + + return getPosts; } @ActivityMethod() diff --git a/libraries/nestjs-libraries/src/integrations/social/instagram.standalone.provider.ts b/libraries/nestjs-libraries/src/integrations/social/instagram.standalone.provider.ts index c9413154..e0bac74f 100644 --- a/libraries/nestjs-libraries/src/integrations/social/instagram.standalone.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/instagram.standalone.provider.ts @@ -30,7 +30,7 @@ export class InstagramStandaloneProvider 'instagram_business_manage_comments', 'instagram_business_manage_insights', ]; - override maxConcurrentJob = 200; // Instagram standalone has stricter limits + override maxConcurrentJob = 200; // Instagram standalone has stricter limits dto = InstagramDto; editor = 'normal' as const;