Merge pull request #708 from halkeye/add-env-for-mastodon
This commit is contained in:
commit
8faa91b011
|
|
@ -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=""
|
||||
|
||||
|
|
|
|||
|
|
@ -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