feat(x): add with AI, paid partenership
This commit is contained in:
parent
6aa5bf3591
commit
2786fbaeba
3 changed files with 29 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ import { useT } from '@gitroom/react/translation/get.transation.service.client';
|
|||
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
|
||||
import { XDto } from '@gitroom/nestjs-libraries/dtos/posts/providers-settings/x.dto';
|
||||
import { Input } from '@gitroom/react/form/input';
|
||||
import { Checkbox } from '@gitroom/react/form/checkbox';
|
||||
|
||||
const whoCanReply = [
|
||||
{
|
||||
|
|
@ -65,6 +66,17 @@ const SettingsComponent = () => {
|
|||
{...register('community')}
|
||||
/>
|
||||
|
||||
<div className="mt-5 flex flex-col gap-[10px]">
|
||||
<Checkbox
|
||||
label={t('label_made_with_ai', 'Made with AI')}
|
||||
{...register('made_with_ai')}
|
||||
/>
|
||||
<Checkbox
|
||||
label={t('label_paid_partnership', 'Paid partnership')}
|
||||
{...register('paid_partnership')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<ThreadFinisher />
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { IsIn, IsOptional, Matches } from 'class-validator';
|
||||
import { IsBoolean, IsIn, IsOptional, Matches } from 'class-validator';
|
||||
|
||||
export class XDto {
|
||||
@IsOptional()
|
||||
|
|
@ -15,4 +15,12 @@ export class XDto {
|
|||
| 'mentionedUsers'
|
||||
| 'subscribers'
|
||||
| 'verified';
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
made_with_ai?: boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
paid_partnership?: boolean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -366,6 +366,8 @@ export class XProvider extends SocialAbstract implements SocialProvider {
|
|||
| 'mentionedUsers'
|
||||
| 'subscribers'
|
||||
| 'verified';
|
||||
made_with_ai?: boolean;
|
||||
paid_partnership?: boolean;
|
||||
}>[]
|
||||
): Promise<PostResponse[]> {
|
||||
const client = await this.getClient(accessToken);
|
||||
|
|
@ -404,6 +406,8 @@ export class XProvider extends SocialAbstract implements SocialProvider {
|
|||
: {}),
|
||||
text: firstPost.message,
|
||||
...(media_ids.length ? { media: { media_ids } } : {}),
|
||||
made_with_ai: !!firstPost?.settings?.made_with_ai,
|
||||
paid_partnership: !!firstPost?.settings?.paid_partnership,
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -425,6 +429,8 @@ export class XProvider extends SocialAbstract implements SocialProvider {
|
|||
postDetails: PostDetails<{
|
||||
active_thread_finisher: boolean;
|
||||
thread_finisher: string;
|
||||
made_with_ai?: boolean;
|
||||
paid_partnership?: boolean;
|
||||
}>[],
|
||||
integration: Integration
|
||||
): Promise<PostResponse[]> {
|
||||
|
|
@ -454,6 +460,8 @@ export class XProvider extends SocialAbstract implements SocialProvider {
|
|||
text: commentPost.message,
|
||||
...(media_ids.length ? { media: { media_ids } } : {}),
|
||||
reply: { in_reply_to_tweet_id: replyToId },
|
||||
made_with_ai: !!commentPost?.settings?.made_with_ai,
|
||||
paid_partnership: !!commentPost?.settings?.paid_partnership,
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue