feat: linkedin post fix and comment

This commit is contained in:
Nevo David 2024-12-04 22:18:45 +07:00
parent 70eebd532c
commit 3e39d4652c
1 changed files with 6 additions and 4 deletions

View File

@ -340,10 +340,12 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
type === 'personal'
? `urn:li:person:${id}`
: `urn:li:organization:${id}`,
commentary: removeMarkdown({
text: firstPost.message.replace('\n', '𝔫𝔢𝔴𝔩𝔦𝔫𝔢'),
except: [/@\[(.*?)]\(urn:li:organization:(\d+)\)/g],
}).replace('𝔫𝔢𝔴𝔩𝔦𝔫𝔢', '\n'),
commentary: firstPost.message
.replace(/\*/g, '\\*')
.replace(/\(/g, '\\(')
.replace(/\)/g, '\\)')
.replace(/\{/g, '\\{')
.replace(/}/g, '\\}'),
visibility: 'PUBLIC',
distribution: {
feedDistribution: 'MAIN_FEED',