diff options
author | marty hiatt <martianhiatus@riseup.net> | 2023-10-20 22:37:41 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2023-10-20 22:37:41 +0200 |
commit | a169646f8cb37d3c249b61ddea93906097d1847a (patch) | |
tree | 9ba12bd36d10db5cb7a5eb70291483b153a6641e /lisp/mastodon-toot.el | |
parent | 0bd2bea47d41545e0b8b6bcbaaa9fca06d202d19 (diff) |
mastodon-toot--own-toot-p: call toot-or-base: we can edit our boosted toots
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 10 |
1 files changed, 6 insertions, 4 deletions
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." |