diff options
author | martianh <martianh@noreply.codeberg.org> | 2022-12-11 21:30:28 +0000 |
---|---|---|
committer | martianh <martianh@noreply.codeberg.org> | 2022-12-11 21:30:28 +0000 |
commit | d9c0d7eeea02c27173ed000af7c560ca978125ea (patch) | |
tree | bc376acd6854448a1285769c72b48de91d41eebe | |
parent | 7aca03bdc678095a1348d41d55a1cbac98558f11 (diff) | |
parent | f238a32c5bbe3131efb7c53a6f89f9f217eac4e0 (diff) |
Merge pull request 'mastodon-tl--spoiler: Add error handling to /preferences api query' (#347) from stellarskylark/mastodon.el:develop into develop
Reviewed-on: https://codeberg.org/martianh/mastodon.el/pulls/347
-rw-r--r-- | lisp/mastodon-tl.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index e732420..41368e8 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1044,8 +1044,12 @@ message is a link which unhides/hides the main body." 'invisible ;; check server setting to expand all spoilers: (unless (eq t - (mastodon-profile--get-preferences-pref - 'reading:expand:spoilers)) + ;; If something goes wrong reading prefs, + ;; just return nil so CWs show by default. + (condition-case nil + (mastodon-profile--get-preferences-pref + 'reading:expand:spoilers) + (error nil))) t) 'mastodon-content-warning-body t)))) |