From a3047d1855facafba0f71f722065cb1ca13b8077 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 13 Aug 2025 14:19:16 +0700 Subject: [PATCH] feat: x error message longer than 2 minutes --- .../src/integrations/social/x.provider.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts index ca32f23c..14bff67a 100644 --- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts @@ -38,8 +38,7 @@ export class XProvider extends SocialAbstract implements SocialProvider { if (body.includes('usage-capped')) { return { type: 'refresh-token', - value: - 'Posting failed - capped reached. Please try again later', + value: 'Posting failed - capped reached. Please try again later', }; } if (body.includes('duplicate-rules')) { @@ -55,6 +54,17 @@ export class XProvider extends SocialAbstract implements SocialProvider { value: 'The Tweet contains a URL that is not allowed on X', }; } + if ( + body.includes( + 'This user is not allowed to post a video longer than 2 minutes' + ) + ) { + return { + type: 'bad-body', + value: + 'The video you are trying to post is longer than 2 minutes, which is not allowed for this account', + }; + } return undefined; }