Skip to content

Commit

Permalink
Merge pull request #481 from gitroomhq/feat/linkedin-weird-behaviour
Browse files Browse the repository at this point in the history
Weird behavior with LinkedIn not posting PNG even though it uploads them
  • Loading branch information
nevo-david authored Dec 9, 2024
2 parents b17727b + c9e8914 commit 8966bf9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
scopes = ['openid', 'profile', 'w_member_social', 'r_basicprofile'];
refreshWait = true;


async refreshToken(refresh_token: string): Promise<AuthTokenDetails> {
const {
access_token: accessToken,
Expand Down Expand Up @@ -331,6 +330,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
: await sharp(await readOrFetch(m.url), {
animated: lookup(m.url) === 'image/gif',
})
.toFormat('jpeg')
.resize({
width: 1000,
})
Expand Down Expand Up @@ -432,7 +432,7 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider {
: `urn:li:organization:${id}`,
object: topPostId,
message: {
text: this.fixText(post.message)
text: this.fixText(post.message),
},
}),
}
Expand Down

0 comments on commit 8966bf9

Please sign in to comment.