aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authorHolger Durer <hdurer@google.com>2018-04-03 18:05:22 +0100
committerJohnson Denen <johnson.denen@gmail.com>2018-08-10 22:20:04 -0400
commit58afa3e24527c0dafeef669c285ac8ab11e3a42e (patch)
treeac3a33ff339dd6f9b00b29d04a68c2059f0e63ec /lisp/mastodon-tl.el
parent4570c441aa71d0f4302f2206a0e328d7ada80eee (diff)
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.)
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ad3de3c..a6e3ed9 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -643,8 +643,9 @@ it is `mastodon-tl--byline-boosted'"
(propertize
(concat body
(mastodon-tl--byline toot author-byline action-byline))
- 'toot-id (cdr (assoc 'id toot))
- 'toot-json toot)
+ 'toot-id (cdr (assoc 'id toot))
+ 'base-toot-id (mastodon-tl--toot-id toot)
+ 'toot-json toot)
"\n\n")
(when mastodon-tl--display-media-p
(mastodon-media--inline-images start-pos (point)))))