diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-08-08 16:10:13 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-08-08 16:10:38 +0200 |
commit | 3ff8f250c3a0e0ab0670cf7af72a2607950e4b5e (patch) | |
tree | 446125b14811f511b7e049975a047cb46dd01890 /lisp/mastodon-toot.el | |
parent | a74340a72789ed12011d3f8618449bbe515a7e77 (diff) |
re-allow boost/fave of own toots!
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index f1f8212..897bf67 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -240,26 +240,27 @@ TYPE is a symbol, either 'favourite or 'boost." (remove (if boost-p (when boosted t) (when faved t))) (toot-type (alist-get 'type (mastodon-tl--property 'toot-json)))) (if byline-region - (cond ((mastodon-toot--own-toot-p (mastodon-tl--property 'toot-json)) - (error "You can't %s your own toots." action-string)) - ((equal "reblog" toot-type) - (error "You can't %s boosts." action-string)) - ((equal "favourite" toot-type) - (error "Your can't %s favourites." action-string)) - (t - (mastodon-toot--action - action - (lambda () - (let ((inhibit-read-only t)) - (add-text-properties (car byline-region) - (cdr byline-region) - (if boost-p - (list 'boosted-p (not boosted)) - (list 'favourited-p (not faved)))) - (mastodon-toot--action-success - (if boost-p "B" "F") - byline-region remove)) - (message (format "%s #%s" (if boost-p msg action) id)))))) + (cond ;; actually there's nothing wrong with faving/boosting own toots! + ;;((mastodon-toot--own-toot-p (mastodon-tl--property 'toot-json)) + ;;(error "You can't %s your own toots." action-string)) + ((equal "reblog" toot-type) + (error "You can't %s boosts." action-string)) + ((equal "favourite" toot-type) + (error "Your can't %s favourites." action-string)) + (t + (mastodon-toot--action + action + (lambda () + (let ((inhibit-read-only t)) + (add-text-properties (car byline-region) + (cdr byline-region) + (if boost-p + (list 'boosted-p (not boosted)) + (list 'favourited-p (not faved)))) + (mastodon-toot--action-success + (if boost-p "B" "F") + byline-region remove)) + (message (format "%s #%s" (if boost-p msg action) id)))))) (message (format "Nothing to %s here?!?" action-string))))) (defun mastodon-toot--toggle-boost () |