feat: who can reply

This commit is contained in:
Nevo David 2025-10-17 16:26:02 +07:00
parent 59d2d54c51
commit 0473c0f1af
1 changed files with 11 additions and 2 deletions

View File

@ -1,9 +1,18 @@
import { IsOptional, Matches } from 'class-validator';
import { IsIn, IsOptional, Matches } from 'class-validator';
export class XDto {
@IsOptional()
@Matches(/^(https:\/\/x\.com\/i\/communities\/\d+)?$/, {
message: 'Invalid X community URL. It should be in the format: https://x.com/i/communities/1493446837214187523',
message:
'Invalid X community URL. It should be in the format: https://x.com/i/communities/1493446837214187523',
})
community?: string;
@IsIn(['everyone', 'following', 'mentionedUsers', 'subscribers', 'verified'])
who_can_reply_post:
| 'everyone'
| 'following'
| 'mentionedUsers'
| 'subscribers'
| 'verified';
}