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 0b95a15c..6fd268a2 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 86e2bc7c..50ac7037 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!);