From 838c75295301e3154c4029792565d661e67e0672 Mon Sep 17 00:00:00 2001 From: mousebot Date: Tue, 10 Aug 2021 00:46:05 +0200 Subject: try to handle reblogged polls --- lisp/mastodon-tl.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lisp') 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))) -- cgit v1.2.3