Merge pull request #708 from halkeye/add-env-for-mastodon

This commit is contained in:
egelhaus 2025-05-26 01:54:05 +02:00 committed by GitHub
commit 8faa91b011
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 4 deletions

View File

@ -70,6 +70,7 @@ DISCORD_BOT_TOKEN_ID=""
SLACK_ID=""
SLACK_SECRET=""
SLACK_SIGNING_SECRET=""
MASTODON_URL="https://mastodon.social"
MASTODON_CLIENT_ID=""
MASTODON_CLIENT_SECRET=""

View File

@ -74,7 +74,7 @@ export class MastodonCustomProvider extends MastodonProvider {
return this.dynamicPost(
id,
accessToken,
'https://mastodon.social',
process.env.MASTODON_URL || 'https://mastodon.social',
postDetails
);
}

View File

@ -39,7 +39,7 @@ export class MastodonProvider extends SocialAbstract implements SocialProvider {
async generateAuthUrl() {
const state = makeId(6);
const url = this.generateUrlDynamic(
'https://mastodon.social',
process.env.MASTODON_URL || 'https://mastodon.social',
state,
process.env.MASTODON_CLIENT_ID!,
process.env.FRONTEND_URL!
@ -102,7 +102,7 @@ export class MastodonProvider extends SocialAbstract implements SocialProvider {
return this.dynamicAuthenticate(
process.env.MASTODON_CLIENT_ID!,
process.env.MASTODON_CLIENT_SECRET!,
'https://mastodon.social',
process.env.MASTODON_URL || 'https://mastodon.social',
params.code
);
}
@ -179,7 +179,7 @@ export class MastodonProvider extends SocialAbstract implements SocialProvider {
return this.dynamicPost(
id,
accessToken,
'https://mastodon.social',
process.env.MASTODON_URL || 'https://mastodon.social',
postDetails
);
}