Skip to content

Commit 8966bf9

Browse files
authored
Merge pull request #481 from gitroomhq/feat/linkedin-weird-behaviour
Weird behavior with LinkedIn not posting PNG even though it uploads them
2 parents b17727b + c9e8914 commit 8966bf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
2121
scopes = ['openid', 'profile', 'w_member_social', 'r_basicprofile'];
2222
refreshWait = true;
2323

24-
2524
async refreshToken(refresh_token: string): Promise<AuthTokenDetails> {
2625
const {
2726
access_token: accessToken,
@@ -331,6 +330,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
331330
: await sharp(await readOrFetch(m.url), {
332331
animated: lookup(m.url) === 'image/gif',
333332
})
333+
.toFormat('jpeg')
334334
.resize({
335335
width: 1000,
336336
})
@@ -432,7 +432,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
432432
: `urn:li:organization:${id}`,
433433
object: topPostId,
434434
message: {
435-
text: this.fixText(post.message)
435+
text: this.fixText(post.message),
436436
},
437437
}),
438438
}

0 commit comments

Comments
 (0)