diff options
-rw-r--r-- | lisp/mastodon-profile.el | 2 | ||||
-rw-r--r-- | lisp/mastodon-tl.el | 5 | ||||
-rw-r--r-- | lisp/mastodon-toot.el | 7 |
3 files changed, 9 insertions, 5 deletions
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" 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))))) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 9491d2a..c21e5b6 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -40,6 +40,7 @@ (autoload 'mastodon-tl--field "mastodon-tl") (autoload 'mastodon-tl--goto-next-toot "mastodon-tl") (autoload 'mastodon-tl--property "mastodon-tl") +(autoload 'mastodon-tl--find-property-range "mastodon-tl") (autoload 'mastodon-toot "mastodon") (defvar mastodon-toot--reply-to-id nil @@ -77,7 +78,7 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (defun mastodon-toot--action (action callback) "Take ACTION on toot at point, then execute CALLBACK." - (let* ((id (mastodon-tl--property 'toot-id)) + (let* ((id (mastodon-tl--property 'base-toot-id)) (url (mastodon-http--api (concat "statuses/" (mastodon-tl--as-string id) "/" @@ -90,7 +91,7 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (interactive) (let* ((byline-region (mastodon-tl--find-property-range 'byline (point))) (id (when byline-region - (mastodon-tl--as-string (mastodon-tl--property 'toot-id)))) + (mastodon-tl--as-string (mastodon-tl--property 'base-toot-id)))) (boosted (when byline-region (get-text-property (car byline-region) 'boosted-p))) (action (if boosted "unreblog" "reblog")) @@ -114,7 +115,7 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (interactive) (let* ((byline-region (mastodon-tl--find-property-range 'byline (point))) (id (when byline-region - (mastodon-tl--as-string (mastodon-tl--property 'toot-id)))) + (mastodon-tl--as-string (mastodon-tl--property 'base-toot-id)))) (faved (when byline-region (get-text-property (car byline-region) 'favourited-p))) (action (if faved "unfavourite" "favourite")) |