aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-04-21 20:33:39 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-04-21 20:33:39 +0200
commit1e671d8258c7d56b1ea07fc083c587b439b97b20 (patch)
tree77a5765b8288dc9f59f48f3ec284bcf1cf7c8c72 /lisp/mastodon-tl.el
parent20085e6740d59232f0f22b62df6812b557ff921c (diff)
wrap report to mods in do-if-toot
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el25
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 1fa0d09..7b26ecd 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2146,18 +2146,19 @@ Optionally report the toot at point, add a comment, cite rules
that have been broken, forward the report to the remove admin,
report the account for spam."
(interactive)
- (when (y-or-n-p "Report author of toot at point?")
- (let* ((url (mastodon-http--api "reports"))
- (toot (mastodon-tl--toot-or-base
- (mastodon-tl--property 'toot-json :no-move)))
- (account (alist-get 'account toot))
- (handle (alist-get 'acct account))
- (params (mastodon-tl--report-params account toot))
- (response (mastodon-http--post url params)))
- ;; (setq masto-report-response response)
- (mastodon-http--triage response
- (lambda ()
- (message "User %s reported!" handle))))))
+ (mastodon-tl--do-if-toot
+ (when (y-or-n-p "Report author of toot at point?")
+ (let* ((url (mastodon-http--api "reports"))
+ (toot (mastodon-tl--toot-or-base
+ (mastodon-tl--property 'toot-json :no-move)))
+ (account (alist-get 'account toot))
+ (handle (alist-get 'acct account))
+ (params (mastodon-tl--report-params account toot))
+ (response (mastodon-http--post url params)))
+ ;; (setq masto-report-response response)
+ (mastodon-http--triage response
+ (lambda ()
+ (message "User %s reported!" handle)))))))
(defvar crm-separator)