aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-http.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-06-07 17:06:54 +0200
committermousebot <mousebot@riseup.net>2021-06-07 17:06:54 +0200
commit93a5c652a97f2b591c32ec4902bbc24781b9a9d7 (patch)
treeda9ca466fd43043682f4caa88b9d93657a3f4772 /lisp/mastodon-http.el
parent68c2942b4c94cc9c3c10b1b1b6d78f3ff6f43fb9 (diff)
mastodon-http--get-async, only process json when status is returned
(hopefully)
Diffstat (limited to 'lisp/mastodon-http.el')
-rw-r--r--lisp/mastodon-http.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index 678e628..cb211d4 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -208,7 +208,8 @@ Pass response buffer to CALLBACK function with args CBARGS."
(mastodon-http--get-async
url
(lambda (status)
- (apply callback (mastodon-http--process-json) args))))
+ (when status ;; only when we actually get sth?
+ (apply callback (mastodon-http--process-json) args)))))
(defun mastodon-http--post-async (url args headers &optional callback &rest cbargs)
"POST asynchronously to URL with ARGS and HEADERS.