diff options
author | Johnson Denen <johnson.denen@gmail.com> | 2017-04-08 13:06:39 -0400 |
---|---|---|
committer | jdenen <Johnson.Denen@ascenaretail.com> | 2017-04-09 08:55:36 -0400 |
commit | b3faec5e80687b1c944e39dc2290922d133b5e65 (patch) | |
tree | 59ef3a77e1e33ae68dcfb04a8e4c746c03c65610 | |
parent | d5e3ff37a9ade01cb0104abc7a308665a5a2e4f7 (diff) |
Add WIP triage function on toot send
-rw-r--r-- | lisp/mastodon-toot.el | 9 | ||||
-rw-r--r-- | lisp/mastodon.el | 1 |
2 files changed, 6 insertions, 4 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)))))))) diff --git a/lisp/mastodon.el b/lisp/mastodon.el index 0103615..424f758 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -6,7 +6,6 @@ :group 'mastodon :type 'string) -;; TODO (defcustom mastodon-token-file (concat user-emacs-directory "mastodon.plstore") "File path where Mastodon access tokens are stored." :group 'mastodon |