aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-22 10:01:26 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-22 10:01:26 +0100
commit2b07cf720d4766b39584bff0d82125335f73f824 (patch)
tree424b17a4be0de9ce67ac1f869e2710025154a7c0
parent8b45a7a83de0747029b6cd1d1cf7628afef0ad6c (diff)
fix --get-response-async re params
-rw-r--r--lisp/mastodon-http.el3
-rw-r--r--lisp/mastodon-tl.el2
2 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-http.el b/lisp/mastodon-http.el
index d56f3ad..d1bf573 100644
--- a/lisp/mastodon-http.el
+++ b/lisp/mastodon-http.el
@@ -321,10 +321,11 @@ PARAMS is an alist of any extra parameters to send with the request."
"GET"
(url-retrieve url callback cbargs))))
-(defun mastodon-http--get-response-async (url callback &rest args)
+(defun mastodon-http--get-response-async (url &optional params callback &rest args)
"Make GET request to URL. Call CALLBACK with http response and ARGS."
(mastodon-http--get-async
url
+ params
(lambda (status)
(when status ;; only when we actually get sth?
(apply callback (mastodon-http--process-response) args)))))
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index d0c2b0b..8d4bba4 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2459,7 +2459,7 @@ favourites."
(buffer (concat "*mastodon-" buffer-name "*")))
(if headers
(mastodon-http--get-response-async
- url 'mastodon-tl--init* buffer endpoint update-function headers)
+ url nil 'mastodon-tl--init* buffer endpoint update-function headers)
(mastodon-http--get-json-async
url nil 'mastodon-tl--init* buffer endpoint update-function))))