aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-08-10 00:46:05 +0200
committermousebot <mousebot@riseup.net>2021-08-10 00:46:05 +0200
commit838c75295301e3154c4029792565d661e67e0672 (patch)
treec28309d56ca79c929a8b7345a34523118ce8f5ea /lisp/mastodon-tl.el
parent27edcd6b2010d4b2e39fe57ce6a5f26ef321d49e (diff)
try to handle reblogged polls
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index bacbebf..cf87c0a 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -708,7 +708,9 @@ it is `mastodon-tl--byline-boosted'"
(interactive
(list
(let* ((toot (mastodon-tl--property 'toot-json))
- (poll (mastodon-tl--field 'poll toot))
+ (reblog (cdr (assoc 'reblog toot)))
+ (poll (or (cdr (assoc 'poll reblog))
+ (mastodon-tl--field 'poll toot)))
(options (mastodon-tl--field 'options poll))
(options-titles (mapcar (lambda (x)
(cdr (assoc 'title x)))
@@ -735,6 +737,8 @@ it is `mastodon-tl--byline-boosted'"
candidates))))))
(if (null (mastodon-tl--field 'poll (mastodon-tl--property 'toot-json)))
(message "No poll here.")
+ ;; TODO: match option number up to option titles so we can message
+ ;; the full option description, not just the number
(let* ((toot (mastodon-tl--property 'toot-json))
(poll (mastodon-tl--field 'poll toot))
(poll-id (cdr (assoc 'id poll)))