From b3faec5e80687b1c944e39dc2290922d133b5e65 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Sat, 8 Apr 2017 13:06:39 -0400 Subject: Add WIP triage function on toot send --- lisp/mastodon-toot.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon-toot.el') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 82fac8c..e648a95 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -11,6 +11,10 @@ (switch-to-buffer-other-window (get-buffer-create "*new toot*")) (mastodon-toot-mode t))) +(defun mastodon-toot--send-triage (status) + (mastodon--http-response-triage status + (lambda () (switch-to-buffer (current-buffer))))) ;; FIXME + (defun mastodon-toot--send () (interactive) (let ((toot (buffer-string)) @@ -18,9 +22,8 @@ (progn (kill-buffer-and-window) (mastodon--http-post endpoint - (lambda (status) (switch-to-buffer (current-buffer))) ;; FIXME - `(("status" . ,toot) - ("visibility" . "public")) + 'mastodon-toot--send-triage + `(("status" . ,toot)) `(("Authorization" . ,(concat "Bearer " (mastodon--access-token)))))))) -- cgit v1.2.3