From 95e20d688df31d1bae7b99389c7b176f474d12f8 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 26 Jul 2022 17:35:58 +0200 Subject: --thread: fetch current toot before printing thread fixes #264, where if you fave a toot then enter its thread, fave status is lost. --- lisp/mastodon-tl.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index cc2f1b8..4309c35 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1138,7 +1138,13 @@ webapp" (mastodon-tl--property 'base-toot-id))) (url (mastodon-http--api (format "statuses/%s/context" id))) (buffer (format "*mastodon-thread-%s*" id)) - (toot (mastodon-tl--property 'toot-json)) + (toot + ;; refetch current toot in case we just faved/boosted: + (mastodon-http--get-json (concat + mastodon-instance-url + "/api/v1/statuses/" + id))) + (mastodon-tl--property 'toot-json)) (context (mastodon-http--get-json url))) (when (member (alist-get 'type toot) '("reblog" "favourite")) (setq toot (alist-get 'status toot))) -- cgit v1.2.3