Merge pull request #481 from gitroomhq/feat/linkedin-weird-behaviour

Weird behavior with LinkedIn not posting PNG even though it uploads them
This commit is contained in:
Nevo David 2024-12-09 22:33:33 +07:00 committed by GitHub
commit 8966bf9593
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -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,
@ -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,
})
@ -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),
},
}),
}