feat: x error message longer than 2 minutes

This commit is contained in:
Nevo David 2025-08-13 14:19:16 +07:00
parent 8b73c1ed56
commit a3047d1855
1 changed files with 12 additions and 2 deletions

View File

@ -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;
}