feat: Move https://mastodon.social to env variable for ability to change instances per install

This commit is contained in:
Gavin Mogan 2025-04-20 11:09:43 -07:00
parent ee0fa5b87f
commit 7f2892e667
3 changed files with 5 additions and 4 deletions

View File

@ -72,6 +72,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
);
}