diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-12 16:26:45 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-09-12 16:35:11 +0200 |
commit | 0b65ec90bd829530fe8bef843f873c3ecc6c0721 (patch) | |
tree | eb2f2ea61e24724bd6317e020ce772acd418aec7 /lisp/mastodon-tl.el | |
parent | 3e404cb392cab584bdf1f73d099ae0dd1c25708f (diff) |
respect user pref reading:expand:spoilers for CWs
respect always expand CWd posts account preference
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d8b2baa..8e75705 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -66,6 +66,7 @@ (autoload 'mastodon-search--get-user-info "mastodon-search") (autoload 'mastodon-http--delete "mastodon-http") (autoload 'mastodon-profile--view-author-profile "mastodon-profile") +(autoload 'mastodon-profile--get-preferences-pref "mastodon-profile") (when (require 'mpv nil :no-error) (declare-function mpv-start "mpv")) @@ -856,7 +857,12 @@ message is a link which unhides/hides the main body." (concat cw (propertize (mastodon-tl--content toot) - 'invisible t + 'invisible + ;; check server setting to expand all spoilers: + (unless (eq t + (mastodon-profile--get-preferences-pref + 'reading:expand:spoilers)) + t) 'mastodon-content-warning-body t)))) (defun mastodon-tl--media (toot) |