Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: linkedin comments limitation

Nevo David9d363c9add4a
diff --git a/apps/frontend/src/components/launches/providers/linkedin/linkedin.provider.tsx b/apps/frontend/src/components/launches/providers/linkedin/linkedin.provider.tsx
index 0b95a15c6..6fd268a21 100644
--- a/apps/frontend/src/components/launches/providers/linkedin/linkedin.provider.tsx
+++ b/apps/frontend/src/components/launches/providers/linkedin/linkedin.provider.tsx
@@ -1,3 +1,14 @@
import { withProvider } from '@gitroom/frontend/components/launches/providers/high.order.provider';
-export default withProvider(null, undefined, undefined, undefined, 3000);
+export default withProvider(null, undefined, undefined, async (posts) => {
+ const [firstPost, ...restPosts] = posts;
+ if (firstPost.length > 1 && firstPost.some((p) => p.path.indexOf('mp4') > -1)) {
+ return 'LinkedIn can have maximum 1 media when selecting a video.';
+ }
+
+ if (restPosts.some((p) => p.length > 0)) {
+ return 'LinkedIn comments can only contain text.';
+ }
+
+ return true;
+}, 3000);
diff --git a/libraries/nestjs-libraries/src/integrations/social.abstract.ts b/libraries/nestjs-libraries/src/integrations/social.abstract.ts
index 86e2bc7c2..50ac7037c 100644
--- a/libraries/nestjs-libraries/src/integrations/social.abstract.ts
+++ b/libraries/nestjs-libraries/src/integrations/social.abstract.ts
@@ -51,6 +51,7 @@ export abstract class SocialAbstract {
!json.includes('The user is not an Instagram Business') &&
!json.includes('Unsupported format') &&
!json.includes('2207018') &&
+ !json.includes('352') &&
!json.includes('REVOKED_ACCESS_TOKEN'))
) {
throw new RefreshToken(identifier, json, options.body!);