Skip to content

Commit 9d363c9

Browse files
committed
feat: linkedin comments limitation
1 parent fa532f8 commit 9d363c9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
import { withProvider } from '@gitroom/frontend/components/launches/providers/high.order.provider';
22

3-
export default withProvider(null, undefined, undefined, undefined, 3000);
3+
export default withProvider(null, undefined, undefined, async (posts) => {
4+
const [firstPost, ...restPosts] = posts;
5+
if (firstPost.length > 1 && firstPost.some((p) => p.path.indexOf('mp4') > -1)) {
6+
return 'LinkedIn can have maximum 1 media when selecting a video.';
7+
}
8+
9+
if (restPosts.some((p) => p.length > 0)) {
10+
return 'LinkedIn comments can only contain text.';
11+
}
12+
13+
return true;
14+
}, 3000);

libraries/nestjs-libraries/src/integrations/social.abstract.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export abstract class SocialAbstract {
5151
!json.includes('The user is not an Instagram Business') &&
5252
!json.includes('Unsupported format') &&
5353
!json.includes('2207018') &&
54+
!json.includes('352') &&
5455
!json.includes('REVOKED_ACCESS_TOKEN'))
5556
) {
5657
throw new RefreshToken(identifier, json, options.body!);

0 commit comments

Comments
 (0)