Skip to content

Commit 0473c0f

Browse files
committed
feat: who can reply
1 parent 59d2d54 commit 0473c0f

File tree

1 file changed

+11
-2
lines changed
  • libraries/nestjs-libraries/src/dtos/posts/providers-settings

1 file changed

+11
-2
lines changed
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
import { IsOptional, Matches } from 'class-validator';
1+
import { IsIn, IsOptional, Matches } from 'class-validator';
22

33
export class XDto {
44
@IsOptional()
55
@Matches(/^(https:\/\/x\.com\/i\/communities\/\d+)?$/, {
6-
message: 'Invalid X community URL. It should be in the format: https://x.com/i/communities/1493446837214187523',
6+
message:
7+
'Invalid X community URL. It should be in the format: https://x.com/i/communities/1493446837214187523',
78
})
89
community?: string;
10+
11+
@IsIn(['everyone', 'following', 'mentionedUsers', 'subscribers', 'verified'])
12+
who_can_reply_post:
13+
| 'everyone'
14+
| 'following'
15+
| 'mentionedUsers'
16+
| 'subscribers'
17+
| 'verified';
918
}

0 commit comments

Comments
 (0)