aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-20 21:17:08 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-20 21:17:08 +0100
commitea155f08605f422c0e6dc96657ce00547b12d67f (patch)
tree0024142539d54fb8cc22b13d2670f9bebd32c11d
parent519c47e28c66a22b5c2b07bebf704ca4dcef5a2a (diff)
delete/redraft/pin toots from notifications
we simply fetch 'base-toot or 'toot-json
-rw-r--r--lisp/mastodon-toot.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 4344e68..f7fea75 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -418,7 +418,8 @@ Uses `lingva.el'."
(defun mastodon-toot--pin-toot-toggle ()
"Pin or unpin user's toot at point."
(interactive)
- (let* ((toot (mastodon-tl--property 'toot-json))
+ (let* ((toot (or (mastodon-tl--property 'base-toot) ;fave/boost notifs
+ (mastodon-tl--property 'toot-json)))
(pinnable-p (mastodon-toot--own-toot-p toot))
(pinned-p (equal (alist-get 'pinned toot) t))
(action (if pinned-p "unpin" "pin"))
@@ -443,7 +444,8 @@ Uses `lingva.el'."
"Delete and redraft user's toot at point synchronously.
NO-REDRAFT means delete toot only."
(interactive)
- (let* ((toot (mastodon-tl--property 'toot-json))
+ (let* ((toot (or (mastodon-tl--property 'base-toot) ;fave/boost notifs
+ (mastodon-tl--property 'toot-json)))
(id (mastodon-tl--as-string (mastodon-tl--toot-id toot)))
(url (mastodon-http--api (format "statuses/%s" id)))
(toot-cw (alist-get 'spoiler_text toot))