diff options
author | Skylar Hill <stellarskylark@posteo.net> | 2022-12-08 22:55:05 -0600 |
---|---|---|
committer | Skylar Hill <stellarskylark@posteo.net> | 2022-12-08 22:55:05 -0600 |
commit | f238a32c5bbe3131efb7c53a6f89f9f217eac4e0 (patch) | |
tree | adcee94639770b07e51c22e4c6dd1c880f865289 /test | |
parent | 8db62b46a141dc862cee6e90afc935964a55b9d4 (diff) |
mastodon-tl--spoiler: Add error handling to /preferences api query
mastodon.el currently breaks when trying to load a spoilered toot if
the /preferences endpoint returns something unexpected, preventing
mastodon-tl--buffer-spec from being set and not automatically enabling
the major mode. This is particularly a problem on GoToSocial, which
does not currently have the endpoint implemented and instead returns a
404 HTML page, causing a JSON parsing error.
This PR adds a simple check which causes the API check in
mastodon-tl--spoiler to return null if it errors, thus triggering the
default behavior of hiding CW'd toots until opened.
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions