aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-08 13:06:39 -0400
committerjdenen <Johnson.Denen@ascenaretail.com>2017-04-09 08:55:36 -0400
commitb3faec5e80687b1c944e39dc2290922d133b5e65 (patch)
tree59ef3a77e1e33ae68dcfb04a8e4c746c03c65610 /lisp/mastodon-toot.el
parentd5e3ff37a9ade01cb0104abc7a308665a5a2e4f7 (diff)
Add WIP triage function on toot send
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el9
1 files changed, 6 insertions, 3 deletions
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))))))))