feat(mastodon): say in Settings when the instance no longer accepts the token

When the instance refuses the token on a post (it was revoked or expired), the account now remembers it: GET /me/mastodon says problem: token_refused and nothing is posted until I connect again with a new token.

- migration 0027 adds mastodon_accounts.problem (SQLite and PostgreSQL).
- Only a refused token marks the account; an instance that is down does not.
- Saving the account again clears the problem.
- Settings shows the warning and the form with the instance already filled in, next to Disconnect.
- English and Italian.
This commit is contained in:
tgiachi 2026-11-14 10:04:07 +01:00
commit a7a258464b
2 changed files with 229 additions and 21 deletions

View file

@ -0,0 +1,3 @@
-- PostgreSQL flavour of sqlite/0027_mastodon_problem.sql.
ALTER TABLE mastodon_accounts ADD COLUMN problem TEXT NOT NULL DEFAULT '';

View file

@ -0,0 +1,4 @@
-- What went wrong with the account of a person, when something did: empty while all is well, `token_refused` after the
-- instance refused the token on a post. While it is set nothing is posted; connecting the account again clears it.
ALTER TABLE mastodon_accounts ADD COLUMN problem TEXT NOT NULL DEFAULT '';