branch: elpa/mastodon
commit f23d45ab65a9004d2384a5bfbe09bf011cbc5889
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    tl: fix control flow of CW base-tags. #839
---
 lisp/mastodon-tl.el | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 92a752f611..87911818d5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2307,17 +2307,16 @@ CW-EXPANDED means treat content warnings as unfolded."
            ""))
         'toot-body t) ;; includes newlines etc. for folding
        ;; post tags:
-       (let ((tags (alist-get 'tags toot)))
-         ;; FIXME: we also need to test here for normal body tags, and if
-         ;; so, don't go ahead:
-         (if tags
-             (let ((rendered (mastodon-tl--base-tags tags body-tags)))
-               (if (mastodon-tl--has-spoiler toot)
-                   (propertize rendered
-                               'invisible t
-                               'mastodon-content-warning-body t)
-                 rendered))
-           ""))
+       (if-let* ((tags (alist-get 'tags toot))
+                 (rendered (mastodon-tl--base-tags tags body-tags)))
+           ;; FIXME: we also need to test here for normal body tags, and if
+           ;; so, don't go ahead:
+           (if (mastodon-tl--has-spoiler toot)
+               (propertize rendered
+                           'invisible t
+                           'mastodon-content-warning-body t)
+             rendered)
+         "")
        ;; byline:
        "\n"
        (if no-byline

Reply via email to