feat: linkedin comments limitation
This commit is contained in:
parent
fa532f80c9
commit
9d363c9add
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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!);
|
||||
|
|
|
|||
Loading…
Reference in New Issue