Skip to content

feat: Move https://mastodon.social to env variable for ability to cha… #708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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
);
}
Expand Down Expand Up @@ -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
);
}
Expand Down