From 58afa3e24527c0dafeef669c285ac8ab11e3a42e Mon Sep 17 00:00:00 2001 From: Holger Durer Date: Tue, 3 Apr 2018 18:05:22 +0100 Subject: Fix the boosting/favouriting of statuses in profiles. (Favouriting itself is still hard since we have clobbered the 'f' keybinding, but if you bind it to something else or invoke it via `M-x mastodon-toot--toggle-favourite` then at least it works.) This also changes the regular boosting/favoriting behavior. Before we would boost/fav a boost or fav instead of the actual toot that was boosted/faved. With this change we always boost/fav the base toot. To do this we now keep a second toot id (with the base toot) in the byline's properities. (For regular statuses 'toot-id and 'base-toot-id will be identical.) --- lisp/mastodon-profile.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index e130c22..c01afc9 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -45,6 +45,7 @@ (autoload 'mastodon-tl--render-text "mastodon-tl.el") (autoload 'mastodon-tl--set-face "mastodon-tl.el") (autoload 'mastodon-tl--timeline "mastodon-tl.el") +(autoload 'mastodon-tl--toot-id "mastodon-tl") (defvar mastodon-instance-url) (defvar mastodon-tl--buffer-spec) @@ -190,6 +191,7 @@ FIELD is used to identify regions under 'account" (mastodon-tl--byline-author `((account . ,toot))) 'byline 't 'toot-id (cdr (assoc 'id toot)) + 'base-toot-id (mastodon-tl--toot-id toot) 'toot-json toot)) (mastodon-media--inline-images start-pos (point)) (insert "\n" -- cgit v1.2.3