feat: Move https://mastodon.social to env variable for ability to change instances per install
This commit is contained in:
parent
ee0fa5b87f
commit
7f2892e667
|
|
@ -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=""
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue