emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon de2937d9fa 12/45: poll not toot arg for format-po


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon de2937d9fa 12/45: poll not toot arg for format-poll
Date: Mon, 24 Jun 2024 10:01:51 -0400 (EDT)

branch: elpa/mastodon
commit de2937d9fa1a35cbc05e1c3d0dd6856d393b4111
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>

    poll not toot arg for format-poll
---
 lisp/mastodon-tl.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index dc1f25140e..89d70a5963 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1232,9 +1232,9 @@ LONGEST-OPTION is the option whose length determines the 
formatting."
           (format "[%s votes]" (or (alist-get 'votes_count option)
                                    "0"))))
 
-(defun mastodon-tl--format-poll (toot)
+(defun mastodon-tl--format-poll (poll)
   "If TOOT includes a poll, return it as a formatted string."
-  (let-alist (mastodon-tl--field 'poll toot) ; toot or reblog
+  (let-alist poll
     (let* ((option-titles (mastodon-tl--map-alist 'title .options))
            (longest-option (car (sort option-titles
                                       (lambda (x y)
@@ -1454,7 +1454,8 @@ Runs `mastodon-tl--render-text' and fetches poll or 
media."
          (media-p (mastodon-tl--field 'media_attachments toot)))
     (concat (mastodon-tl--render-text content toot)
             (when poll-p
-              (mastodon-tl--format-poll toot))
+              (mastodon-tl--format-poll
+               (mastodon-tl--field 'poll toot))) ;; toot or reblog
             (when media-p
               (mastodon-tl--media toot)))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]