diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-02-18 18:58:24 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-02-18 18:58:24 +0100 |
commit | 990bd88c56105f6524150fb04552148539688f14 (patch) | |
tree | 18138d2c01092038aac1db287c55f0b2b76ef2ff /lisp/mastodon-toot.el | |
parent | 37c0397bf76284aaef20949d50721b7d5fefc259 (diff) |
tl--buffer-type-eq/profile-buffer-p for all buffer checks, hopefully
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r-- | lisp/mastodon-toot.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 7b9163a..250aefd 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -77,7 +77,6 @@ (autoload 'mastodon-tl--render-text "mastodon-tl") (autoload 'mastodon-profile--fetch-server-account-settings-maybe "mastodon-profile") (autoload 'mastodon-http--build-array-params-alist "mastodon-http") -(autoload 'mastodon-tl--get-endpoint "mastodon-tl") (autoload 'mastodon-http--put "mastodon-http") (autoload 'mastodon-tl--symbol "mastodon-tl") (autoload 'mastodon-tl--view-scheduled-toots "mastodon-tl") @@ -356,10 +355,10 @@ TYPE is a symbol, either 'favourite or 'boost." ;; & nothing wrong with faving/boosting own toots from notifs: ;; this boosts/faves the base toot, not the notif status ((and (equal "reblog" toot-type) - (not (string= (mastodon-tl--get-endpoint) "notifications"))) + (not (mastodon-tl--buffer-type-eq 'notifications))) (error "You can't %s boosts" action-string)) ((and (equal "favourite" toot-type) - (not (string= (mastodon-tl--get-endpoint) "notifications"))) + (not (mastodon-tl--buffer-type-eq 'notifications))) (error "You can't %s favourites" action-string)) ((and (equal "private" visibility) (equal type 'boost)) @@ -1581,7 +1580,7 @@ Added to `after-change-functions'." (defun mastodon-toot--compose-buffer-p () "Return t if compose buffer is current." - (equal (buffer-name (current-buffer)) "*new toot*")) + (mastodon-tl--buffer-type-eq 'new-toot)) ;; NB: now that we have toot drafts, to ensure offline composing remains ;; possible, avoid any direct requests here: |