aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-15 14:33:17 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-15 14:33:17 +0100
commita2bcbb47f32abcfae496a8d0aa27ec8a59101c60 (patch)
treef6201ec34a0a4fbd5755fe4d60dd143a86780ec2
parent7593590d5c7a1ea9824424cc46d0cad4130eb9b2 (diff)
url-lookup: no tl--property calls allowed in tl--thread!
-rw-r--r--lisp/mastodon-tl.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 3e8c08d..86a7b56 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1301,13 +1301,12 @@ ID is that of the toot to view."
(defun mastodon-tl--thread (&optional id)
"Open thread buffer for toot at point or with ID."
+ ;; NB: this is called by `mastodon-url-lookup', which means it must work
+ ;; without `mastodon-tl--buffer-spec' being set!
+ ;; so avoid calls to `mastodon-tl--property' and friends
(interactive)
- (let* ((id
- (or id
- ;; avoid -tl--property here, we don't want to try next toot:
- ;; this requires that 'base-toot-id always be set:
- (get-text-property (point) 'base-toot-id)))
- (type (mastodon-tl--field 'type (mastodon-tl--property 'toot-json))))
+ (let* ((id (or id (get-text-property (point) 'base-toot-id)))
+ (type (mastodon-tl--field 'type (get-text-property (point) 'toot-json))))
(if (or (string= type "follow_request")
(string= type "follow")) ; no can thread these
(error "No thread")