Fix #5366: Baraag broken.

* Use fixed access tokens instead of fetching an access token with the OAuth flow. This assumes
  access tokens won't expire, which seems to be true for the default app-level access token, unless
  you manually regenerate it. Fixes the OAuth flow not working on Baraag for some reason.

* Eliminate the MastodonApiClient class. Just inline it in the extractor instead.

Downstream users will need to update their configs to set the `pawoo_access_token` and
`baraag_access_token` config options.
This commit is contained in:
evazion
2022-12-10 18:22:24 -06:00
parent 15bdf7d6cf
commit 993e4fd62f
4 changed files with 54 additions and 128 deletions

View File

@@ -381,19 +381,11 @@ module Danbooru
end
# http://tinysubversions.com/notes/mastodon-bot/
def pawoo_client_id
def pawoo_access_token
nil
end
def pawoo_client_secret
nil
end
def baraag_client_id
nil
end
def baraag_client_secret
def baraag_access_token
nil
end