From a169646f8cb37d3c249b61ddea93906097d1847a Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 20 Oct 2023 22:37:41 +0200 Subject: mastodon-toot--own-toot-p: call toot-or-base: we can edit our boosted toots --- lisp/mastodon-toot.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 426a371..6fba951 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -546,10 +546,12 @@ Uses `lingva.el'." (message "No mastodon buffer?")))) (defun mastodon-toot--own-toot-p (toot) - "Check if TOOT is user's own, e.g. for deleting it." - (and (not (alist-get 'reblog toot)) - (equal (alist-get 'acct (alist-get 'account toot)) - (mastodon-auth--user-acct)))) + "Check if TOOT is user's own, for deleting, editing, or pinning it." + ;; this check needs to allow acting on own toots displayed as boosts, so we + ;; call `mastodon-tl--toot-or-base'. + (let ((json (mastodon-tl--toot-or-base toot))) + (equal (alist-get 'acct (alist-get 'account json)) + (mastodon-auth--user-acct)))) (defun mastodon-toot--pin-toot-toggle () "Pin or unpin user's toot at point." -- cgit v1.2.3