aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-toot.el9
-rw-r--r--lisp/mastodon.el1
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