diff --git a/apps/frontend/src/components/launches/internal.channels.tsx b/apps/frontend/src/components/launches/internal.channels.tsx
index aa6f2af3..17c91bf2 100644
--- a/apps/frontend/src/components/launches/internal.channels.tsx
+++ b/apps/frontend/src/components/launches/internal.channels.tsx
@@ -7,6 +7,8 @@ import { PickPlatforms } from '@gitroom/frontend/components/launches/helpers/pic
import { useIntegration } from '@gitroom/frontend/components/launches/helpers/use.integration';
import { Select } from '@gitroom/react/form/select';
import { Slider } from '@gitroom/react/form/slider';
+import { Input } from '@gitroom/react/form/input';
+import { Textarea } from '@gitroom/react/form/textarea';
import { useSettings } from '@gitroom/frontend/components/launches/helpers/use.values';
import clsx from 'clsx';
import { useT } from '@gitroom/react/translation/get.transation.service.client';
@@ -68,6 +70,37 @@ export const InternalChannels: FC<{
);
};
+const PlugField: FC<{
+ plugIdentifier: string;
+ field: {
+ name: string;
+ description: string;
+ type: string;
+ placeholder: string;
+ validation?: RegExp;
+ };
+}> = ({ plugIdentifier, field }) => {
+ const fieldName = `plug--${plugIdentifier}--${field.name}`;
+
+ if (field.type === 'textarea') {
+ return (
+
+ );
+ }
+
+ return (
+
+ );
+};
+
const Plug: FC<{
plug: {
identifier: string;
@@ -151,6 +184,17 @@ const Plug: FC<{
))}
+ {plug.fields.length > 0 && (
+
+ {plug.fields.map((field) => (
+
+ ))}
+
+ )}
{t('accounts_that_will_engage', 'Accounts that will engage:')}
diff --git a/apps/orchestrator/src/main.ts b/apps/orchestrator/src/main.ts
index 03bf80a2..dacc5743 100644
--- a/apps/orchestrator/src/main.ts
+++ b/apps/orchestrator/src/main.ts
@@ -5,6 +5,8 @@ dayjs.extend(utc);
import { NestFactory } from '@nestjs/core';
import { AppModule } from '@gitroom/orchestrator/app.module';
+import * as dns from 'node:dns';
+dns.setDefaultResultOrder('ipv4first');
async function bootstrap() {
// some comment again
diff --git a/libraries/nestjs-libraries/src/integrations/social/linkedin.page.provider.ts b/libraries/nestjs-libraries/src/integrations/social/linkedin.page.provider.ts
index 8aebb98c..6327a243 100644
--- a/libraries/nestjs-libraries/src/integrations/social/linkedin.page.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/linkedin.page.provider.ts
@@ -90,6 +90,21 @@ export class LinkedinPageProvider
};
}
+ override async addComment(
+ integration: Integration,
+ originalIntegration: Integration,
+ postId: string,
+ information: any,
+ ) {
+ return super.addComment(
+ integration,
+ originalIntegration,
+ postId,
+ information,
+ false
+ );
+ }
+
override async repostPostUsers(
integration: Integration,
originalIntegration: Integration,
@@ -293,7 +308,7 @@ export class LinkedinPageProvider
{
headers: {
Authorization: `Bearer ${accessToken}`,
- 'Linkedin-Version': '202405',
+ 'Linkedin-Version': '202511',
'X-Restli-Protocol-Version': '2.0.0',
},
}
@@ -308,7 +323,7 @@ export class LinkedinPageProvider
{
headers: {
Authorization: `Bearer ${accessToken}`,
- 'Linkedin-Version': '202405',
+ 'Linkedin-Version': '202511',
'X-Restli-Protocol-Version': '2.0.0',
},
}
@@ -323,7 +338,7 @@ export class LinkedinPageProvider
{
headers: {
Authorization: `Bearer ${accessToken}`,
- 'Linkedin-Version': '202405',
+ 'Linkedin-Version': '202511',
'X-Restli-Protocol-Version': '2.0.0',
},
}
diff --git a/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts b/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts
index d0415bfc..941aa8c9 100644
--- a/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts
@@ -188,7 +188,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
headers: {
'Content-Type': 'application/json',
'X-Restli-Protocol-Version': '2.0.0',
- 'LinkedIn-Version': '202501',
+ 'LinkedIn-Version': '202511',
Authorization: `Bearer ${token}`,
},
}
@@ -233,7 +233,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
headers: {
'Content-Type': 'application/json',
'X-Restli-Protocol-Version': '2.0.0',
- 'LinkedIn-Version': '202501',
+ 'LinkedIn-Version': '202511',
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
@@ -266,7 +266,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
method: 'PUT',
headers: {
'X-Restli-Protocol-Version': '2.0.0',
- 'LinkedIn-Version': '202501',
+ 'LinkedIn-Version': '202511',
Authorization: `Bearer ${accessToken}`,
...(isVideo
? { 'Content-Type': 'application/octet-stream' }
@@ -298,7 +298,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
}),
headers: {
'X-Restli-Protocol-Version': '2.0.0',
- 'LinkedIn-Version': '202501',
+ 'LinkedIn-Version': '202511',
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
},
@@ -554,21 +554,10 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
isPdf
);
- console.log({
+ const response = await this.fetch(`https://api.linkedin.com/rest/posts`, {
method: 'POST',
headers: {
- 'LinkedIn-Version': '202501',
- 'X-Restli-Protocol-Version': '2.0.0',
- 'Content-Type': 'application/json',
- Authorization: `Bearer ${accessToken}`,
- },
- body: JSON.stringify(postPayload),
- });
-
- const response = await this.fetch('https://api.linkedin.com/rest/posts', {
- method: 'POST',
- headers: {
- 'LinkedIn-Version': '202501',
+ 'LinkedIn-Version': '202511',
'X-Restli-Protocol-Version': '2.0.0',
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
@@ -703,6 +692,47 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
return [this.createPostResponse(commentPostId, commentPost.id, false)];
}
+ @PostPlug({
+ identifier: 'linkedin-add-comment',
+ title: 'Add comments by a different account',
+ description: 'Add accounts to comment on your post',
+ pickIntegration: ['linkedin', 'linkedin-page'],
+ fields: [
+ {
+ name: 'comment',
+ description: 'The comment to add to the post',
+ type: 'textarea',
+ placeholder: 'Enter your comment here',
+ },
+ ],
+ })
+ async addComment(
+ integration: Integration,
+ originalIntegration: Integration,
+ postId: string,
+ information: any,
+ isPersonal = true
+ ) {
+ return this.comment(
+ integration.internalId,
+ postId,
+ undefined,
+ integration.token,
+ [
+ {
+ id: makeId(10),
+ message: information.comment,
+ media: [],
+ settings: {
+ post_as_images_carousel: false,
+ },
+ },
+ ],
+ integration,
+ isPersonal ? 'personal' : 'company'
+ );
+ }
+
@PostPlug({
identifier: 'linkedin-repost-post-users',
title: 'Add Re-posters',