aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-06-03 10:30:10 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-06-03 10:30:10 +0200
commit0396383c6586dcf5a8f84aa30f597f6dab21d7b8 (patch)
treee7b6842528e657e16ca8cf4c2455c075474a46b9 /lisp/mastodon-tl.el
parentd2c1a90ec48c4d90635c673c782e266fa5dd915e (diff)
editing to preserve polls. create poll plist from JSON.
still can't edit actual polls, but can view/clear them, which is much better than zilch.
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 7345ea3..573c2fa 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1220,7 +1220,7 @@ SENSITIVE is a flag from the item's JSON data."
(defun mastodon-tl--format-poll-option (option option-counter length)
"Format poll OPTION. OPTION-COUNTER is just a counter.
-LONGEST-OPTION is the option whose length determines the formatting."
+LENGTH is of the longest option, for formatting."
(format "%s: %s%s%s\n"
option-counter
(propertize (alist-get 'title option)
@@ -1233,7 +1233,7 @@ LONGEST-OPTION is the option whose length determines the formatting."
"0"))))
(defun mastodon-tl--format-poll (poll)
- "If TOOT includes a poll, return it as a formatted string."
+ "From json poll data POLL, return a display string."
(let-alist poll
(let* ((option-titles (mastodon-tl--map-alist 'title .options))
(longest (car (sort (mapcar #'length option-titles) #'>)))