aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormartianh <martianh@noreply.codeberg.org>2022-12-11 21:30:28 +0000
committermartianh <martianh@noreply.codeberg.org>2022-12-11 21:30:28 +0000
commitd9c0d7eeea02c27173ed000af7c560ca978125ea (patch)
treebc376acd6854448a1285769c72b48de91d41eebe /lisp
parent7aca03bdc678095a1348d41d55a1cbac98558f11 (diff)
parentf238a32c5bbe3131efb7c53a6f89f9f217eac4e0 (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
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el8
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))))