From 597d3a1f6e62df80f67fcb378342d2e2fdfeb96a Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 15 Apr 2023 20:38:04 +0200 Subject: docstring + actual request for report-to-mods --- lisp/mastodon-tl.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index aa016cf..3ebcec1 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2103,7 +2103,8 @@ Prefix is sent to `mastodon-tl--show-tag-timeline', which see." (mastodon-http--get-json url nil :silent))) (defun mastodon-tl--report-to-mods () - "" + "Report the author of the toot at point to your instance moderators. +Optionally report the toot at point, optionally add a comment, optionally cite rules that have been broken, optionally forward the report to the remove admin, optionally report the account for spam." (interactive) (when (y-or-n-p (format "report author of toot at point?")) (let* ((url (mastodon-http--api "reports")) @@ -2136,13 +2137,11 @@ Prefix is sent to `mastodon-tl--show-tag-timeline', which see." alist))) ;; FIXME: the above approach adds nils to your params. (setq params (delete nil params)) - (message "%s" (prin1-to-string params)) - (let ((response ;; (mastodon-http--post-async url params))) - ;; (mastodon-http--triage response - ;; (lambda (response) - ;; (message "User %s reported!" handle))) - ;; ))) - )))))) + ;; (message "%s" (prin1-to-string params)) + (let ((response (mastodon-http--post-async url params))) + (mastodon-http--triage response + (lambda (response) + (message "User %s reported!" handle))))))) (defun mastodon-tl--read-rules-ids () "Prompt for a list of instance rules and return a list of selected ids." -- cgit v1.2.3